tables in web pages

  Marky_Bhoy 13:18 06 Jun 2004

I have used tables to layout my web pages but I have heard that this is not necessarily a good thing.

Could someone explain to me why the use of tables is not reconmended?

  PurplePenny 14:22 06 Jun 2004

The first two paragraphs of this reply are paraphrased from the writings of Dan Shafer and Jeffrey Zeldman, I'll try to do them justice.

Tables were never meant to control layout - they were origianlly intended to hold tabular data. Unfortunately the lack of design control in the original code meant that designers had to use whatever was at their disposal to enable decent layout - and that was the table.

Now the ideal is to separate code into its three elements - HTML,XHTML or XML provides the content/structure, CSS provides the design/presentation and DOM (a standard object model) controls the behaviour through the use of JavaScript/ECMAScript.

Read Dan Shafer's Sitepoint articles (actually chapters from his book but they are the ones with the pros and cons in so worth reading):

click here

and A List Apart (co-founded by Jeffery Zeldman)

click here

for more on tables, the arguments, and the use of CSS positioning as an alternative.

There is also the accessibilty issue - over-use of tables is frowned on in accessibility guidelines.

This leads to an interesting point about how published standards can conflict with real use. The W3C standard says that all tables must have summaries (which are, for instance, read out to users of screen readers). So to conform to standards we all have to add summaries to our layout tables "This table is for layout only". I've even seen more complex summaries - "This table is for layout only and provides the left navigation for the page". But in accessibility terms that is counter-productive. Does a blind user having the screen read out really want to hear all that for every table?


  Marky_Bhoy 14:43 07 Jun 2004

thanks for your response.

I will reconsider the use of tables.

  Forum Editor 21:08 07 Jun 2004

so don't forsake them completely. The thing to avoid is prolific use of nested tables - they'll slow a page loading if anything does.

Experiment with tables, but don't become a slave to them and you'll be fine.

  Forum Editor 21:11 07 Jun 2004

Thanks Penny, for the excellent links and your comment about blind users - I'm currently researching the subject of access to web pages for the blind, for a major report to a client, and it's all grist to the mill.

  PurplePenny 00:03 08 Jun 2004

You'll find plenty more either on the Sitepoint site or via links from it. There is an interview on there with Julie Howell of the RNIB:

click here


  Forum Editor 01:07 08 Jun 2004

Very helpful.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5 review

50 best online Adobe XD tutorials

iPad Pro 10.5in (2017) review

Comment connecter un MacBook à une TV ?