Tables

so now we move on to making tables, now tables can be a world of pain and they can be used very effectively if you know how so lets get to it.

<table>
<tr><td>content</td><td>content</td><td>content</td><td>content</td></tr>
</table>

Now lets break this down to understand how this works, to start with we have the table tag which states the opening of a table, next is the <tr> tag which stands for table row and lastly is the table column which is the <td> tag. A <tr> contains multiple <td> tags inside it.

So lets have a look at what the output looks like

contentcontentcontentcontent


Now we can play with attributes with the table tag to give it a border or cell spacing like this.

<table border="1" cellspacing="2">
<tr><td>content</td><td>content</td><td>content</td><td>content</td></tr>
</table>

it will look like this

contentcontentcontentcontent


Tables should only be used when you want to control the layout of a form or some very small data. Tables should never be used to control the layout of web pages as this out dated and this done now with <div> tags combined with CSS and will be looking into that later. 

                                                                                                                                                                            

This free website was made using Yola.

No HTML skills required. Build your website in minutes.

Go to www.yola.com and sign up today!

Make a free website with Yola