Why are tables considered bad form?

  • 14 years ago

    Hello,

    I'm very new to website design and am loving my nice neat table based designs (I only plan to create 3 or 4 page sites). Recently though my world was rocked when I was told that tables were now considered bad form and should be replaced by CSS. Can anyone tell me why tables are so wrong? I don't mind using CSS if there is a good enough reason to. Please find it in you to help a clueless person!

  • 14 years ago
    The table element in html is supposed to be used to display tabular data. It is not supposed to be used for laying out your design. However, the table element does make it quite easy to visually lay out relatively complex designs on a page, so it is often used in that way.

    However, this causes problems for people not using visual web browsers. For example, a visually impaired person might visit your site using a screen reader. The screen reader will read out the web page. If it encounters a table then it will say "table of data, row one..." etc. But if you have used a table to visually lay out the page, what is announced by the screen reader will make no sense whatsoever.

    The problem with using tables to layout a page is that the resultant page only makes sense if you are able to look at it. And not everyone in the world can do that.

    If you restrict yourself to using CSS to layout your page and tables to display tabular data, then both the sighted person and the blind person will have equal access to your page.
  • 14 years ago

    Hi,
    Tables are not so wrong..

    Some use CSS because its little bit useful in search engine optimization and helps in ranking high.

    Thankyou

  • 14 years ago

    Hi,
    Tables are not so wrong..

    Some use CSS because its little bit useful in search engine optimization and helps in ranking high.

    Thankyou

  • 14 years ago

    Tables are bad WHEN you do not know how to format them right

    Tables are really useful when you do know how...

    Tables alow you format your site much easier (for instance, lining up input fields in a form)

    As long as you don't have the default border, they're fine...

  • 14 years ago

    Tables are not wrong to use. They actually keep data in very good manner.
    Learn it properly you will find how it is useful.


  • 14 years ago

    CSS with tables = good

    CSS without tables = bad

    CSS without tables is much harder to implement and requires that the browser be the right type and size (absolute positioning) because what you see on your computer is NOT what you get.

    Moral of the story? If you are going to use CSS for formatting, use it with tables if you want simplicity (note that I'm only talking about table-based stuff, not text formatting, for which CSS is a must these days!)

  • 14 years ago

    heres my input as a web developer,

    Tables should only be used when dispaying data, not formatting and as said above they are not dda complient, well for formatting. Many of our big clients insist on dda compliance and no tables so its good to get in the habit young.

    Some DDA complience for website design :

    http://www.dda-compliant.com/developers/75_How-To-Design-For-DDA-Compliance.html

  • 14 years ago

    My 2 cents worth....

    Once using tables for html layout was all the rage, now css layout has taken over why?

    It is simply because the html standards have evloved from html 4.0 to xhtml 1.0 and css2.0 and all major browsers now support it. > see www.w3c.org

    Html 4.0 is still widly used and allows you to have "invalid" or a poorly structured html document.





    xhtml "sort of" evloved from xml. xml like html is a tag based document <tag>text</tag> but it must be valid - absolutely correct in structure etc. Like wise xhtml should be a valid html document in its structure and tag usage. This is where css comes into play

    To have a valid xhtml document you really should NOT or minamise the use of html to produce the design or layout. HTML should be used to hold the data or information in a meaningful way. Then css applyed to provided the desired appearence. The key concept is to sepearte data from design and this has real world benifits. No longer are websites only accessed by browsers, more and more small screen devices are being used, screen readers, programs reading website like search engines etc. So instead of expecting devices to interperate a large mash of html meaningful to the eye and little or no real relation to the information it holds the reverse is preferable.

    So to provide a clean and valid standard for html xhtml 1.0 and css 2.0 have evolved and will continue to do so.

    So why not tables for html layout. It's purely a matter of choice to stay with the old way or move on to the new.

    From a developers point of view it is a serperior programing model

    Regards





    Brin

  • 14 years ago
    Hbcdev is right, this was all part of the W3C's initiative in cleaning up HTML, tables are bad form for three main reasons. Frstly: tabular data should be the only form of data apparent in tables. Secondly: in the progression towards XML the W3C would have us developing in XHTML standards.  In which the HTML document only represents content whilest the CSS handles structure and Finally: this approach is disability friendly and adheres to modern accesibility standards.

    - These of course is the official reasons as to why the changes were implimented at least.



Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil perpetrated by skilled but perverted professionals.” - Jon Ribbens