After this lesson you should be able to comfortably insert a table to your website

In HTML, you can create tables for your website using the <table> tag in conjunction with the <tr><td> and <th> tags.

Each table row is defined with a <tr> tag. Each table header is defined with a <th> tag. Each table data/cell is defined with a <td> tag.

By default, the text in <th> elements are bold and centered.

By default, the text in <td> elements are regular and left-aligned.

You can use the <caption> element to specify a caption for tables. It should be placed immediately after the opening <table> tag


<!DOCTYPE html>



<title> </title>


<header> </header>



<caption> class list </caption>


    <th> name </th>

    <th> class  </th>

    <th> Age </th>



    <td> Jill </td>

    <td> 4 </td>

    <td> 10 </td>



    <td> Eve </td>

    <td> 5 </td>

    <td> 12 </td>



    <td> mike </td>

    <td> 7 </td>

    <td> 14 </td>



    <td> tim </td>

    <td> 2 </td>

    <td> 8 </td>





Let’s review what we have learnt so far about table
<table> element to define a table
<tr> element to define a table row
<td> element to define a table data
<th> element to define a table heading
<caption> element to define a table caption
Scroll to Top