The HTML5 table Tag
The HTML5 <table> tag is mainly used for putting tables within an HTML document. When the HTML5 <table> tag is used, it would be necessary to use other elements like <tr>, <th> and <td>. The <tr> tag is the one that specifies the table heading. The <th> tag is incorporated in the document to determine the table heading. For table call, the <td> tag has to be used.
Some tables may have more complex parts. This can be done by using other elements like <col>, <caption>, <colgroup>, <tfoot>, <thead> and <tbody>.
The HTML5 <table> tag is used differently as compared to how it was initially utilized in HTML4.01. That is because, in HTML5, only the border attribute is still useful. All others are no longer accepted.
Below is that clarification that can be used for HTML5 <table> tag:
Attribute |
Value |
Description |
border |
"" |
This is the key in determining if border has to be present in the table |
cellpadding |
pixels |
This is no longer used in HTML5 |
cellspacing |
pixels |
This is no longer used in HTML5 |
frame |
void |
This is no longer used in HTML5 |
rules |
none |
This is no longer used in HTML5 |
summary |
text |
This is no longer used in HTML5 |
width |
pixels |
This is no longer used in HTML5 |