Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Teachable.

Table – HTML



Tables are used to show tabular data on a web page.


Here is an example of a simple HTML table:

    <th>Header 1</th>
    <th>Header 2</th>
    <th>Header 3</th>

    <th>Row Header</th>
    <td>Cell 1</td>
    <td> Cell 2</td>

    <th>Row Header</th>
    <td>Cell 3</td>
    <td>Cell 4</td>

An HTML table is composed of the tr element for the rows, the th element for the headings, and the td element for the regular table cells. These elements are all nested inside a table element.


Recreate the embedded CodePen demo by typing out the HTML code in your index.html file.


Table element – MDN

Lesson tags: Open Lesson
Back to: HTML Reference > HTML Tables