Tables just suck.
For almost one year now I have been dependent on using the div tag to build websites. I have to say that I love them. This last month I have had some quick turn around times and thought I would see how long it took to actually build a site using tables instead of the div tag.
One of the sites I decided to tested this with was for a home builder cleint of mine. It was a very easy design that that I felt could benefit from using tables. This way I could build it out super quick. This wasn’t the case my friends. It took me twice as long to build the actual table layout compaired to a simular div layout. For this project I was testing this site on six different browsers.
- Firefox - Mac
- Safari - Mac
- Opera - Mac
- Firefox - PC
- IE 6 - PC
- IE 7 - PC
I could not get any of the six browsers to display the same way. I encountered so many styling issues and problems with cross platform CSS and HTML rendering issues. The differences were so noticeable that I decided to throw out all tables, and start over from scratch with the div tag.
In HTML and XHTML, span and div tags are used to describe content that cannot be properly described by other, more semantic tags. The div tag defines a division or section within an HTML or XHTML document and hence it’s name, (abbreviation), div.
A good reason to use the div tag is that the mark up is considerably less. One third of the code used to mark up a table environment is used with a div environment. Its simply amazing. Also the div tag gives the designer the ability to code semantically which is great for cross platform viewing (cell phones, computers, etc).
So I sit here and ponder why people would even use tables anymore. I think it has a lot to do with a coders comfort zone. certain designers and coders just become comfortable with his or her code, and they don’t want to improve upon their skills for several factors. One factor is time, it takes a good amount of time to learn a new coding concept (especially using the div tag). Another factor is that the coder just doesn’t feel its necessary to learn new coding concepts.