Module 5: HTML Lists and Tables

HTML Lists

HTML lists are used to group related items together. There are three types of lists:

Example:


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

HTML Tables

HTML tables are used to display data in a structured format. A table is created using the <table> tag along with <tr> (table row), <th> (table header), and <td> (table data) tags.

Example:


<table>
    <tr>
        <th>Name</th>
        <th>Age</th>
    </tr>
    <tr>
        <td>John</td>
        <td>25</td>
    </tr>
</table>
            

Try It Yourself

Quiz: Test Your Knowledge

Which HTML tag is used to define a table row?

Coding Challenge

Create an ordered list of your top 3 favorite programming languages, and then create a table with 2 columns: "Language" and "Years of Experience" for each language.