Core HTML Tags Overview

Lists and Tables

1. Ordered Lists (<ol>)

An ordered list displays items in a numbered sequence. This is useful when the order of the items is important.

HTML Example:

<ol>
    <li>First item</li>
    <li>Second item</li>
    <li>Third item</li>
</ol>

Explanation:

  1. First item
  2. Second item
  3. Third item

2. Unordered Lists (<ul>)

An unordered list displays items with bullet points. This is used when the order of items is not significant.

HTML Example:

<ul>
    <li>First item</li>
    <li>Second item</li>
    <li>Third item</li>
</ul>

Explanation:

3. Tables (<table>)

Tables are used to display data in a structured grid. The table consists of rows and columns, with each row defined by the <tr> tag, header cells defined by the <th> tag, and data cells defined by the <td> tag.

HTML Example:

<table border="1">
    <tr>
        <th>Name</th>
        <th>Age</th>
    </tr>
    <tr>
        <td>Alice</td>
        <td>24</td>
    </tr>
    <tr>
        <td>Bob</td>
        <td>30</td>
    </tr>
</table>

Explanation:

Name Age
Alice 24
Bob 30
Previous Next
Modern Footer