HTML Element: td
Read Time:
1 min
The <td>
element (“table data”) represents a data cell in a <table>
. It’s nested inside the <tr>
(“table row”) element.
Example
Syntax
1 |
<table>
|
2 |
<tr>
|
3 |
<td>Jane</td> |
4 |
<td>Doe</td> |
5 |
<td>Web Developer</td> |
6 |
</tr>
|
7 |
</table>
|
Result
Browser Support
The <td>
tag is supported in all modern browsers as well as many email clients. Read more on caniuse.com.
Attributes
The <td>
tag supports Global Attributes in HTML. Global Attributes are common to all HTML elements and can be used on all of them (though they may not have much of an effect on some of them).
The <td>
element also supports:
-
colspan
– Number of columns that the cell is to span. -
rowspan
– Number of rows that the cell is to span. -
headers
– The header cells for the cell.
Content
Within a <td>
flow content is supported.
Learn More
Did you know? A
<td>
element’s end tag (</td>
) can be omitted if the <td>
element is immediately followed by a <td>
or <th>
element, or if there is no more content in the parent element.HTML Elements
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Web Design tutorials. Never miss out on learning about the next big thing.
Sign upI write, teach, and love learning all things web. While I specialize in product design I’m a man of many hats who has worked with mom and pop shops to fortune 500 corporations.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.