HTML <tbody> Tag
Description
The <tbody>
HTML element is designed to store one or more rows of the table. This allows you to create structural blocks to which you can apply a single design through styles, as well as control their appearance through scripts.
It is allowed to apply several <tbody>
elements inside the <table>
container. Other types of line groupings are available - <tfoot>
and <thead>
, none of them should overlap with the <tbody>
element.
Properties
- Permitted Parents
- Within the required parent
<table>
element, the<tbody>
element can be added after a<caption>
,<colgroup>
, and a<thead>
element - Content
<tr>
- Start/End Tags
- Start tag: required, End tag: required
Example
<table border = "1">
<thead>
<tr><td colspan="2">Table Header (thead)</td></tr>
</thead>
<tfoot>
<tr><td colspan="2">Table Footer (tfoot)</td></tr>
</tfoot>
<tbody>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
<tr>
<td>Cell 5</td>
<td>Cell 6</td>
</tr>
</tbody>
</table>
Attributes
Attribute | Definition |
---|---|
align | Visual alignment. Possible values:
|
valign | Vertical alignment. Possible values:
|
char | Specifies a character to use for aligning text to. Used when align=char. |
charoff | Specifies an alignment offset (either in pixels or percentage value) against the first character as specified with the char attribute. Used when align=char |
Global Attributes
The <tbody>
tag also supports the Global Attributes in HTML5
Event Attributes
The <tbody>
tag also supports the Event Attributes in HTML5
Browser Support
Desktop | |||||
Yes | Yes | 1 | 1 | Yes | Yes |
Tablets / Mobile | |||||
![]() |
|||||
Yes | Yes | 4 | Yes | Yes | Yes |
Last updated by CSSPortal on: 6th December 2019
HTML Tags
- a
- abbr
- address
- area
- article
- aside
- audio
- b
- base
- bdi
- bdo
- blockquote
- body
- br
- button
- canvas
- caption
- cite
- code
- col
- colgroup
- comment
- datalist
- dd
- del
- details
- dfn
- dialog
- div
- dl
- doctype
- dt
- em
- embed
- fieldset
- figcaption
- figure
- footer
- form
- h1
- h2
- h3
- h4
- h5
- h6
- head
- header
- hr
- html
- i
- iframe
- img
- input
- ins
- kbd
- keygen
- label
- legend
- li
- link
- map
- mark
- menu
- meta
- meter
- nav
- noscript
- object
- ol
- optgroup
- option
- output
- p
- param
- picture
- pre
- progress
- q
- rp
- rt
- ruby
- s
- samp
- script
- section
- select
- small
- source
- span
- strong
- style
- sub
- summary
- sup
- table
- tbody
- td
- textarea
- tfoot
- th
- thead
- time
- title
- tr
- track
- u
- ul
- var
- video
- wbr