Tables - You Can Still Use Them In Web Design
By Tony Depledge | Published  05/11/2006 | Tutorials | Rating:
Page 2 of 2

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:

StumbleUpon Toolbar


How would you rate the quality of this article?
1 2 3 4 5
Poor Excellent
Your NameYour Email
Your Comment:

Verification:
Enter the security code shown below:
imgRegenerate Image


Related Articles
Comments
  • Comment #1 (Posted by John Smith)
    Rating
    I completely agree!
    I have been railling against this kind of stupidity for years. There really is still a place for tables in HTML and until they invent something better they simply do the best job alot of the time.
     
  • Comment #2 (Posted by JohntheBaptist)
    Rating
    Good stuff, though your codes are messed up (the < etc.. are all showing instead of the symbol they're supposed to be converted into).

    I think a lot of CSS theory has been hijacked by "purists" who've lost all sense. I can remember taking days to come up with some hackneyed CSS method for one website when a table would've done what I wanted and could've bene put together in less than half an hour.
     
Submit Comment