From a personal point of view, I always thought that tables were easier to understand.
divs are the way to go because they are alot more flexible. However, there are many issues regarding cross-browser compatibility.
In a nutshell, a <div> is the start of a division, terminated or closed by </div>
Within the css styling (which can be specified in the same page or in one common page for all of your site), you can specify how this <div> looks. Divs tend to be more powerful as a result.
I have just changed all of my site from tables to divs.
I'll give a very quick example.
In tables, for the whole page, you might use the following:
HTML:
<table width="100">
<tr>
<td> </td>
<td>
<p>Some content</p>
</td>
<td> </td>
</tr>
</table>
or something like that (too tired to think)
with divs and styling, you use several divs to split it up.
i.e.
HTML:
<div id="wrapper">
Some content
</div>
which looks a lot simpler, but you then have to tell your div what it looks like (in the head).
HTML:
<style type="text/css">
#wrapper{
border: 1px solid #000;
width: 750px;
margin-left: auto;
margin-right:auto;
}
</style>
This style specifies the look for the one-off "div" called "wrapper" with a single line black border, 750 pixels wide and automatically centres.
One major advantage of divs is the ability to change the look of a whole site based on one css style page.
For instance, if you were to use the same divs in multiple pages, with a tag in each page head like:
HTML:
<link href="../css/mystyle.css" rel="stylesheet" type="text/css" />
You can then create one style page (called mystyle.css). In this page, you might structure it as follows:
HTML:
@charset "utf-8";
/* CSS Document */
body{
background: #99cccc;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #000;
}
#wrapper{
more styling
}
column{
more styling
}
etc...
When you change the single css style page, every page that uses this style page will change accordingly.
Good no?
_____
By the way, when you get your head round that, you might like to se this post which may help more.
http://forums.x10hosting.com/tutorials/94826-css-testing.html