Are HTML tables bad for layout?

  Tags: internet   html   web design


In the early days of HTML and the web, many developers used HTML tables to structure page layouts. Today, however, many advocate the use of DIVs instead of TABLEs. Do you think HTML tables are bad for layout?

Arguments For

Yes, HTML tables are BAD for layout.

Semantically, tables are for tabular data.
DIVs can create the same structural layout as any table.
CSS is faster.[1]
CSS is more friendly to search engines.[1]
Modern web design separates content from layout. Since layout defines the position of content using CSS, the position should not be defined using tables.
Designs that use nested tables are horrendous and complex; a CSS-based solution would be far cleaner and easier to read and maintain.

Extraneous HTML

Using tables leads to bloated code. For example, you can use:

<div class='section1'></div>
<div class='section2'></div>

Instead of:

<td class='section1'>
<td class='section2'>

Arguments Against

No, HTML tables are fine for layout.

The clarity and ease-of-use of HTML tables is better than DIVs.
Tables have been used for years in layouts without a problem.
Support for older browsers, or limited-functionality smartphone browsers.
The so-called Semantic Web is an idealistic plan that won't work in the real world. It is a "kindergarten" solution[3] to a complex problem.
DIVs can become just as messy and unmaintainable as tables if the programmer doesn't code it cleanly. An overuse of DIVs can be a mess.[4]


 1  Tables vs Divs Fetched Sept 15, 2009 (Incutio.com)
 2  <Table> or <div> Fetched Sept 15, 2009 (WebmasterWorld.com)
 3  Tables versus CSS: Pros and Cons Fetched Sept 15, 2009 (Decloak.com)
 4  From Table Hell to Div Hell Fetched Sept 15, 2009 (SmashingMagazine.com)

User Comments & Opinion


1 Voted Yes

profile pic
The web is constantly evolving and changing, and the need for speed is ever increasing. A newer technology is needed to replace the old one and the rate at which a webpage loads and displays needs to be faster. With more complex search engines having easer to read code will increase your chance of having your website appear in the results. Tables still have there purposes but for page layout DIV's are better. - _fraz_ (twitter) 0

1 Voted No

profile pic
I think HTML tables are here to stay. - jennyhooah (twitter) vote up image vote down image 0
Vote "Yes" Comment:
* Note: Your comment will be tweeted.
Vote "No" Comment:
* Note: Your comment will be tweeted.
Recent Changes   dot   Latest Comments   dot   63 Total Users   dot   260 Total Debates since Aug '09