HTML - <td>
The Table cell HTML element (<td>
) defines a cell of a table that contains data. It participates in the table model.
Example
Please see the <table>
page for examples on <td>
.
Description
The Table cell HTML element (<td>
) defines a cell of a table that contains data. It participates in the table model.
Content categories | None. |
---|---|
Permitted content | Flow content. |
Tag omission | The start tag is mandatory. The end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element. |
Permitted parent elements | A <tr> element. |
Normative document | HTML5, section 4.9.9 (HTML4.01, section 11.2.6) |
Browser Compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 1.0 | 1.0 (1.7 or earlier) | (Yes) | (Yes) | (Yes) |
align/valign attribute |
1.0 | No support[1] | (Yes) | (Yes) | (Yes) |
char/charoff attribute |
1.0 | No support[2] | (Yes) | (Yes) | (Yes) |
bgcolor attribute |
No support | No support | (Yes) | No support | No support |
colspan attribute with value 0 (extend to the end of the colgroup) |
No support | (Yes) | No support | No support | No support |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
align/valign attribute |
? | No support[1] | ? | ? | ? |
char/charoff attribute |
? | No support[2] | ? | ? | ? |
bgcolor attribute |
No support | No support | (Yes) | No support | No support |
[1] This is currently not implemented in Gecko. See bug 915.
[2] This is currently not implemented in Gecko. See bug 2212.
See Also
This element implements the HTMLTableDataCellElement
interface.
License
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/td