MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › td
<td> HTML table data cell element - MDN Web Docs
2 weeks ago - The <td> HTML element defines a cell of a table that contains data and may be used as a child of the <tr> element.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Element › td
<td>: The Table Data Cell element - HTML - MDN Web Docs
The <td> HTML element defines a cell of a table that contains data and may be used as a child of the <tr> element.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › thead
<thead> HTML table head element - MDN Web Docs
2 weeks ago - <caption>, <col>, <colgroup>, <table>, <tbody>, <td>, <tfoot>, <th>, <tr>: Other table-related elements · background-color: CSS property to set the background color of each head cell · border: CSS property to control borders of head cells · text-align: CSS property to horizontally align each head cell content · vertical-align: CSS property to vertically align each head cell content ... This page was last modified on Apr 24, 2026 by MDN contributors.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › th
<th> HTML table header element - MDN Web Docs
2 weeks ago - <table> <tr> <th scope="col">Symbol</th> <th scope="col">Code word</th> <th scope="col">Pronunciation</th> </tr> <tr> <th scope="row">A</th> <td>Alfa</td> <td>AL fah</td> </tr> <tr> <th scope="row">B</th> <td>Bravo</td> <td>BRAH voh</td> </tr> <tr> <th scope="row">C</th> <td>Charlie</td> <td>CHAR lee</td> </tr> <tr> <th scope="row">D</th> <td>Delta</td> <td>DELL tah</td> </tr> </table>
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › table
<table> HTML table element - MDN Web Docs - Mozilla
2 weeks ago - table { border-collapse: collapse; border: 2px solid rgb(140 140 140); font-family: sans-serif; font-size: 0.8rem; letter-spacing: 1px; } caption { caption-side: bottom; padding: 10px; font-weight: bold; } thead, tfoot { background-color: rgb(228 240 245); } th, td { border: 1px solid rgb(160 160 160); padding: 8px 10px; } td:last-of-type { text-align: center; } tbody > tr:nth-of-type(even) { background-color: rgb(237 238 242); } tfoot th { text-align: right; } tfoot td { font-weight: bold; }
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Element › table
<table>: The Table element - HTML - MDN Web Docs - Mozilla
table { border-collapse: collapse; border: 2px solid rgb(140 140 140); font-family: sans-serif; font-size: 0.8rem; letter-spacing: 1px; } caption { caption-side: bottom; padding: 10px; font-weight: bold; } thead, tfoot { background-color: rgb(228 240 245); } th, td { border: 1px solid rgb(160 160 160); padding: 8px 10px; } td:last-of-type { text-align: center; } tbody > tr:nth-of-type(even) { background-color: rgb(237 238 242); } tfoot th { text-align: right; } tfoot td { font-weight: bold; }
MDN Web Docs
devdoc.net › web › developer.mozilla.org › en-US › docs › Web › HTML › Element › table.html
<table> - HTML | MDN - Developer's Documentation Collections
<p>Simple table with header</p> <table> <tr> <th>First name</th> <th>Last name</th> </tr> <tr> <td>John</td> <td>Doe</td> </tr> <tr> <td>Jane</td> <td>Doe</td> </tr> </table> <p>Table with thead, tfoot, and tbody</p> <table> <thead> <tr> <th>Header content 1</th> <th>Header content 2</th> </tr> </thead> <tbody> <tr> <td>Body content 1</td> <td>Body content 2</td> </tr> </tbody> <tfoot> <tr> <td>Footer content 1</td> <td>Footer content 2</td> </tr> </tfoot> </table> <p>Table with colgroup</p> <table> <colgroup span="4"></colgroup> <tr> <th>Countries</th> <th>Capitals</th> <th>Population</th> <t
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Element › tr
<tr>: The Table Row element - HTML - MDN Web Docs - Mozilla
The <tr> HTML element defines a row of cells in a table. The row's cells can then be established using a mix of <td> (data cell) and <th> (header cell) elements.
Can I Use
caniuse.com › mdn-html_elements_td
HTML element: td | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › table-layout
table-layout - CSS - MDN Web Docs - Mozilla
table { table-layout: fixed; width: 120px; border: 1px solid red; } td { border: 1px solid blue; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } ... This page was last modified on Apr 20, 2026 by MDN contributors.
Mozilla
interactive-examples.mdn.mozilla.net › pages › tabbed › table.html
HTML Demo: <table>
table { border-collapse: collapse; border: 2px solid rgb(140 140 140); font-family: sans-serif; font-size: 0.8rem; letter-spacing: 1px; } caption { caption-side: bottom; padding: 10px; font-weight: bold; } thead, tfoot { background-color: rgb(228 240 245); } th, td { border: 1px solid rgb(160 160 160); padding: 8px 10px; } td:last-of-type { text-align: center; } tbody > tr:nth-of-type(even) { background-color: rgb(237 238 242); } tfoot th { text-align: right; } tfoot td { font-weight: bold; }
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Styling_basics › Tables
Styling tables - Learn web development | MDN
/* font import */ @import "https://fonts.googleapis.com/css2?family=Rock+Salt&display=swap"; /* spacing */ table { table-layout: fixed; width: 100%; border-collapse: collapse; border: 3px solid purple; } thead th { line-height: 1.5; } thead th:nth-child(1) { width: 30%; } thead th:nth-child(2) { width: 20%; } thead th:nth-child(3) { width: 15%; } thead th:nth-child(4) { width: 35%; } th, td { padding: 20px; } /* typography */ html { font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; } thead th, tfoot th { font-family: "Rock Salt", cursive; } th { letter-spacing: 2px; } td { lette
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Reference › Elements › tbody
<tbody> HTML table body element - MDN Web Docs
2 weeks ago - <caption>, <col>, <colgroup>, <table>, <td>, <tfoot>, <th>, <thead>, <tr>: Other table-related elements · background-color: CSS property to set the background color of each body cell · border: CSS property to control borders of body cells · text-align: CSS property to horizontally align each body cell content · vertical-align: CSS property to vertically align each body cell content ... This page was last modified on Apr 24, 2026 by MDN contributors.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Reference › Properties › table-layout
table-layout CSS property - MDN Web Docs
3 weeks ago - table { table-layout: fixed; width: 120px; border: 1px solid red; } td { border: 1px solid blue; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } ... This page was last modified on Apr 20, 2026 by MDN contributors.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › HTML › Element › thead
<thead>: The Table Head element - HTML - MDN Web Docs
March 6, 2025 - thead, tfoot { background-color: #2c5e77; color: white; } tbody { background-color: #e4f0f5; } table { border-collapse: collapse; border: 2px solid rgb(140 140 140); font-family: sans-serif; font-size: 0.8rem; letter-spacing: 1px; } caption { caption-side: bottom; padding: 10px; } th, td { border: 1px solid rgb(160 160 160); padding: 8px 10px; } td { text-align: center; }
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Structuring_content › HTML_table_basics
HTML table basics - Learn web development | MDN
This article gets you started with HTML tables, covering the very basics such as rows, cells, headings, making cells span multiple columns and rows, and how to group together all the cells in a column for styling purposes.
HTML Standard
html.spec.whatwg.org › multipage › tables.html
4.9.1 The table element
td · >< input · id · = e4 · type · = number · step · = 0.01 · min · = 0 · value · = 0 · required · form · = f · > </ table · > < form · id · = f · action · = "/auction.cgi" > < input · type · = button · name · = add · value · = "Submit" > </ form · > ✔MDN ·
Can I Use
caniuse.com › mdn-html_elements_td_width
HTML element: td: width | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › HTMLTableCellElement
HTMLTableCellElement - Web APIs | MDN
The HTMLTableCellElement interface provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of table cells, either header cells (<th>) or data cells (<td>), in an HTML document.
GitHub
github.com › mdn › learning-area › blob › main › accessibility › css › table-css.html
learning-area/accessibility/css/table-css.html at main · mdn/learning-area
th,td { padding: 10px; } · td { text-align: center; } · th[scope="col"] { background: #ccc; } · tr:nth-child(even) { background: #eee; } ·
Author mdn