YouTip LogoYouTip

HTML Tables and Lists

HTML Tables

<table>
    <thead>
        <tr><th>Name</th><th>Age</th></tr>
    </thead>
    <tbody>
        <tr><td>Alice</td><td>25</td></tr>
        <tr><td>Bob</td><td>30</td></tr>
    </tbody>
</table>

HTML Lists

<!-- Unordered -->
<ul>
    <li>Item 1</li>
    <li>Item 2</li>
</ul>

<!-- Ordered -->
<ol>
    <li>First</li>
    <li>Second</li>
</ol>

Summary

  • Tables use table, thead, tbody, tr, th, td
  • ul for unordered, ol for ordered lists
← HTML5 Semantic ElementsHTML Forms and Input Types β†’