This is Head |
It can be multiple |
By default it is bold and centered |
1st data cell |
2nd data cell |
3rd data cell |
1st cell of 2nd row |
2nd cell of 2nd row |
3rd cell of 2nd row |
colspan is 1 |
colspan is 2 |
Some Important notes
- Table is parent tag of thead, tbody
- thead, tbody don't have any visual effect on web page but they are sementic
- thead, tbody are not multiple in number, there is one thead and tbody elements nested in table element
- While th is child of tr nested under thead
- Similarly td is child of tr nested under tbody
- th and td can be multiple in numbers nested under tr
- th has data of table head elements. It has by-default bold and center as its visual effect
-
The td elements are the data containers of the table. They can contain all sorts of HTML
elements; text, images, lists, other tables, etc.
- tr can be nested under both tags
thead
as well as tbody
- tr defines table row with data cell as children either td or that one time
Understanding with Examples
Simple Examples