td HTML Table Cell Tag
HTML Table cells are marked by the td tag: <td>...</td>
HTML cells are the little boxes in tables that you can put things in, like text, images, or even another table. You can make rows and columns of boxes to organize your things. For example, you can put your toys in one row and your books in another row. You can also put labels on the boxes to tell what’s inside them. HTML table cells help you make your web page look neat and tidy.
The td is the child of the tr (table row), and it can contain text, images and other inline or block elements, even another nested table.
A very simple 2×2 HTML table with 4 cells.
Table Cells Are Marked With th In The Header
Table cells are marked with th in the header, and td in the table body and the footer. You can place them directly as the child of a table row even if there's no thead, tbody, tfoot defined, as demonstrated below.
Here's a list to sum it up:
- th - in thead
- td - in tbody and tfoot
|th head 1||th head 2|
|td body 1||td body 2|
|td foot 1||td foot 2|
Use the th tag for cells in the header.
Nested Tables: Table in a Cell
Nested tables are a way of putting many small tables inside a big table. Imagine you have a big box that can fit many small boxes inside it. Each small box can have different things inside it, like text or images or other boxes. You can use the big box to organize and store your small boxes. That’s kind of like what nested tables do. They help you organize and store your data in a neat way.
Table in a table cell
Merging Table Cells
Cells that span 3 widths.
Table Cells Generator
Click a table cell below to generate the code for a HTML table instantly. Use this tool to set up table cells automatically in the header, body and footer. Style the sections using the templates in the gallery.