Lists and Tables

Unordered Lists

<ul>
    <li>Item 1</li>
    <li>Item 2</li>
</ul>

Ordered Lists

<ol>
    <li>Item A</li>
    <li>Item B</li>
</ol>

Tables

<table border="1">
    <tr>
        <th>Name</th>
        <th>Age</th>
    </tr>
    <tr>
        <td>Ana</td>
        <td>25</td>
    </tr>
</table>

Best Practices

  • Use <th> for column headers.
  • Avoid using tables for layout; use CSS instead.

Exercise

Create a page with one ordered list, one unordered list, and a table with 3 columns and 4 rows.