[ View menu ]

It’s ok to use tables… Just not in the layout

Written on August 8, 2006

Some people have taken CSS beyond layouts - to the point of arranging data. Tables are still a key part of web design and have an important part in arranging data.

According to the W3C: “The HTML table model allows authors to arrange data — text, preformatted text, images, links, forms, form fields, other tables, etc. — into rows and columns of cells.”

The key word here is data. The definition of data is - “actual information, especially information organized for analysis or used to reason or make decisions.”

When to use tables
- If the content is a record of data, such and information organizable by a spreadsheat.
- If you’re going to have header fields at the top of columns of data or to the left of rows of data
- If the contents makes sense in a database, especially a very simple database, and you just want to display the data, and not “make it pretty”, then a table is acceptable.

When to not use tables
- To position the contents on the page in some way. For example, to add spacing around an image, to place bullet icons on a list, or to force a block of text to act like a pull quote.
- Cutting up an image and then placing the image pieces back together using a table.

Tables Are Your Friend
It is quite possible to create a Web page that uses very creative looking tables for tabular data and still remain valid and standards-based XHTML. Tables are an important part of the XHTML specification, and learning to display tabular data well is an important part of creating Web pages.

Filed in: CSS, Web Design.

WordPress database error: [Can't open file: 'wp_comments.MYI'. (errno: 144)]
SELECT * FROM wp_comments WHERE comment_post_ID = '34' AND comment_approved = '1' ORDER BY comment_date

No Comments

Write comment - TrackBack - RSS Comments

Write comment