I have read that nesting tables inside other table cells is bad Html practice.

When a browser reaches a table cell that has a nested table it has to go through and parse all of the table cells within the nested table.

From looking at various articles about the only reason I can find not to nest tables is that it slows down the page loading/parsing process. It takes up more bandwidth.

As long as all of the tags are closed properly, other than the hit taken in the efficiency of loading/parsing the page, I can't see any reason not to nest tables. I'm not sure that I agree with the idea that nesting tables, within reason, is bad Html practice.

Can anybody think of any other reasons why nesting Html tables is bad practice?

    Tables should be used for one purpose only: to contain tabular data that logically consists of rows and columns of data (i.e., a matrix). Tables should not be used as a means of controlling the visual presentation of a HTML page, which is 99.9% of the situations where nested tables are currently used on the web.

    "Why tables for layout is stupid: problems defined, solutions offered"

    And from the W3C HTML 4.01 Specification:

    Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.

      NogDog;

      Thanks for responding to my problem. I appreciate the help.

      I'm in the process of re-designing a web site that I operate. I figure that now is as good a time as any to start integrating css or fewer tables into my web design.

      Thanks again.

        Go for it! The conversion from tables to CSS can seem frustrating at times, because it takes a sort of different mind set. But the rewards are both a powerful vocabulary for controlling the way pages look, smaller and cleaner pages, more semantic markup (may improve search engine ranking) and easier site maintenance (you can just change one stylesheet file to change the look of an entire site if you do things right).

        You might want to visit the CSS forum at PHPBuilder's sister site WebDeveloper.com for lots of useful help and advice.

        PS: You might want to visit http://www.csszengarden.com/ for some inspiration: all the sample pages use the exact same HTML mark-up; the only differences are the stylesheets used (and the graphics associated with them, of course).

          Roger Ramjet wrote:

          You will probably find Position is Everything very useful for examples of CSS layouts and practical solutions to CSS browser bugs.

          The above says it all when it comes to CSS layouts. Great in theory, awfully buggy in practice.

            Write a Reply...