Adding a table

You can add a table to your page with the following code.

<table>

<tr>
<td>

Your text goes here...

</td>
</tr>

</table>

The code above makes a simple one cell table. Tables are extremely useful and a lot of websites on the internet uses tables to format their page. The above code has many different codes in it, we will now try and explain them to you.

<table></table> This tag has an opening tag and a closing tag. The opening tag tells the browser that it is the beginning of a talbe. The closing tag ends the table.

<tr></tr> Like the table tag, this tag has an opening and a closing tag. The opening tag (<tr>) starts a row and the closing tag (</tr>) ends the row.

<td></td> This tag has a opening and closing too. The d in td stands for data which just means where you put everything that you want to go in your table (the body of the table). The opening tag starts a cell and the closing tag ends a cell.

Below is an example:

Cell
Cell
Cell

The above is a simple table and you can see that there are three rows and three cells in each row. So, you start your code with the <table> tag and for each row you want you use the <tr> tag and for each cell you want, you would use the <td> tag. It's very simple and after each cell, you end it with the </td> tag and end each row with </tr> and each table with </table> tag.

Copyright Brains That Work .
Theme by Pool theme design by Borja Fernandez. ^Top^