Block Level Elements
HTML consists mainly of block level elements and inline elements. Block level elements are containers or boxes that start and end with a new line, such as a paragraph, table or a div. Inline elements can be placed in the middle of a line of text - such as bold or italic (although elements can be changed from inline to block and vice-versa with CSS).
A <div> is the name given to a generic container, a single box. A <table> is the name given to a box which is divided into rows and columns. It seems to me that if you want a part of your website divided into columns, it makes more sense to use the element which is meant to be divided into columns, the TABLE, rather than trying to construct a series of columns out of separate containers (DIVs)If you want to connstuct
Search Engine Friendly?
It has been said that CSS layouts are more search engine friendly and are leaner and quicker to download. While this is certainly true when compared to old-style nested table layouts, it is not necessarily the case - table layouts with external style sheets for styling can be just as lean as CSS only layouts; is there any great differance between these two:
Typical css layout:
<div id="header"></div>
<div id="container">
<div id="leftcolumn"></div>
<div id="centrecolumn"></div>
<div id="rightcolumn"></div>
</div>
<div id="footer"></div>
Is this much different?:
<div id="header"></div>
<table id="container">
<tr>
<td id="leftcolumn"></td>
<td id="centrecolumn"></td>
<td id="rightcolumn"></td>
</tr>
</table>
<div id="footer"></div>
Conclusion
If you want to construct your multicolumn layout using only divs, then feel free to do so. Likewise if you want to lay out a form using CSS. But if you would rather use the HTML element designed for being divided into rows and columns, or your boss or customer are breathing down your neck and the CSS just won't work the way you want it to - remember - there is no law against using a table
About the Author
Tony Depledge is a freelance web designer and website publisher. More articles and information on web design, hosting, e-commerce and internet marketing at Depledge Design.
Share and Enjoy: