Saturday, 7 November 2009

Tutorial 6 : HTML Creating a Table.

This tutorial will focus on creating a table for your site layout. This is incredibly useful as once you get your head around tables and how they work then you can create pretty complicated websites. Tables can also be used to add structure to your data and make the page look more organized.

Firstly we want to use the <table> tags to open up our table.

<table>


</table>

Secondly we shall start by adding a row to our page.


<table>

<tr>


</tr>

</table>

And thirdly to create your table we now need to add the following lines:


<table>

<tr>

<td>

Hello

</td>

</tr>

</table>

So as you can see tr starts and ends a row and td starts and ends a column. To see the results properly I want you to modify the table tags a bit.

Type the following:

<table width="200px" height="100px" border="1">

This should set the table's width and height appropriately and now that we entered the code: border="1"
We can now see the table with outlines. I myself use this to help me plot out websites that I am creating as it gives a clear picture as to where your columns and rows are.

Tasks:

1) Try adding some more rows and columns so that you can display the following.

hello1
hello2
hello1-2
hello2-2


Thanks for completing another HTML tutorial. Please remember to press the follow button and keep track of any new tutorials.

No comments:

Post a Comment