HTML Tables - Lesson 9

At this lesson we will talk about HTML Tables and for what we need it.

HTML Tables are being used to create a table, for this we need <table>,<tr><th> and <td> tags.

When you start creating a table use <table> </table> tag.

Inside that use <tr> </tr> tag. Each table row need <tr> tag.

If you need a table heading than you will need <th> </th> tags. <th> is default bold and centered text.

Then is <td> </td> tag and it's table cell.

The structure is next:

<table>

<tr>

<th>Heading 1</th>                

<th>Heading 2</th>

<th>Heading 3</th>

</tr>

<tr>

<td>First Text 1</td>                

<td>First Text 2</td>

<td>First Text 3</td>

</tr>

<tr>

<td>Second Text 1</td>

<td>Second Text 2</td>

<td>Second Text 3</td>

</tr>

<tr>

<td>Third Text 1</td>

<td>Third Text 2</td>

<td>Third Text 3</td>

</tr>

</table>

<td> tags are looking at <th> tags. To explane Heading 1 cells are First Text 1, Second Text 1, Third Text 1

and Heading 2 cells First Text 2, Second Text 2, Third Text 2 and so on.