Welcome to HTML Tables! 📊

Understanding Tables in HTML

HTML tables are used to display data in a grid format. They consist of rows and columns, making it easy to organize and show information.

Table Tags:

Example Table

        <table>
            <caption>Fruit and Price List</caption>
            <tr>
                <th>Fruit</th>
                <th>Price</th>
            </tr>
            <tr>
                <td>Apple</td>
                <td>$1</td>
            </tr>
            <tr>
                <td>Banana</td>
                <td>$0.5</td>
            </tr>
        </table>
    

Try It Yourself

HTML Tables Quiz 🎯

1. What tag is used to define a table?

<tr>
<table>
<td>

2. Which tag is used for table header cells?

<th>
<td>
<tr>

3. What does the <td> tag define in a table?

Table row
Table header
Table data cell

4. Which tag is used to define a row in a table?

<tr>
<td>
<th>

5. What is the purpose of the <caption> tag in a table?

To add a title to the table
To add a row
To create table data