Tag Training V2.0

The two types of layouts

The two main types of layout as previously talked about are tables:


This is a table example

this is a table called section 1    
this is a table called section 2    

The main problem I find with tables is the control of them. With using CSS you can layout the site exactly where you want it.


This is a div example

This is a div tag called section 1

This is a div tag called section 2

The main thing you will probably say is that they both look more or less the same. Which is true. But there are 2 main differences that make div tags better over tables. For a start the code.

for a table the code is fairly long..

<table width="200" height="150" border="0">
<caption>
This is a table example
</caption>
<tr class="section1">
<td>this is a table called section 1</td>
</tr>
<tr class="section2">
<td>this is a table called section 2</td>
</tr>
</table>


for the same thing using div tags is alot shorter and easier

<caption>
This is a div example
</caption>
<div id="section1"> <p>This is a div tag called section 1</p></div>
<div id="section2"> <p>This is a div tag called section 2</p></div>


But what about the colours you ask? We will get to this later when we cover CSS styling.

 

© Matthew Hillman 2006/7 | Apple Gate Studios