Layout /

NOTE: This test was removed from Nibbler on 24/02/2011 and replaced with the Semantic HTML test.

The layout test looks for the use of tables as layout.

Why do we test for this?

Tables were traditionally used to lay out web pages in two columns, but since the advent of CSS and modern browsers a few years ago, it is no longer necessary to use tables for anything but tabular information.  It is now best practice to create columnar layouts using divs and CSS.  This also helps rendering in non-visual browsers or when a sites stylesheet is not available.

How do we test for this?

We look for elements inside table cells which might indicate the use of tables for layout.  These include divs, headings and tables.

What can I do about it?

It might not be easy, but you should convert all pages of your site that use tables for layout to use divs and CSS.  Only use tables for tabular information, e.g. a table of prices.