The HTML5 td Tag
The HTML5 <td> tag is used for specifying the cell within a table that has to be incorporated within an HTML document. There are two main types of cells which can be used for tables in HTML documents. These are the following:
- 1. Header cells—When putting these cells in the document, it is necessary to use the <th> element. The <th> element will enable the author to define the header information. By default, the texts placed in here are always bold and centered.
- 2. Standard cells—When defining the standard cells, the <td> element is used. Data for each cell is placed by using this element. By default, the information placed here are regular and centered to the left.
Use of the HTML5 <td> tag is not allowed in <thead> element. However, the HTML5 <td> tag is supportive with the Global Attributes and Event Attributes in HTML5. It is also recognized in different web browsers that are primarily used these days like Internet Explorer, Google Chrome, Safari, Firefox and Opera.
Below is a clarification when it comes to the attributes for HTML5 <td> tag:
Attribute |
Value |
Description |
abbr |
text |
This is not longer used and accepted in HTML5 |
align |
left |
This is not longer used and accepted in HTML5 |
axis |
category_name |
This is not longer used and accepted in HTML5 |
char |
character |
This is not longer used and accepted in HTML5 |
charoff |
number |
This is not longer used and accepted in HTML5 |
colspan |
number |
It is essential in determining the number of columns that a particular cell should span |
headers |
header_id |
It is used in determining one or more header cells that a cell should belong to |
height |
pixels |
This is not longer used and accepted in HTML5 |
nowrap |
nowrap |
This is not longer used and accepted in HTML5 |
rowspan |
number |
It is essential in determining the number of rows that a particular cell should span |
scope |
col |
This is not longer used and accepted in HTML5 |
valign |
top |
This is not longer used and accepted in HTML5 |
width |
pixels |
This is not longer used and accepted in HTML5 |