Tutorial 19: CSS Positioning, Part II - HTML with Style | 6 | WebReference

Tutorial 19: CSS Positioning, Part II - HTML with Style | 6

index123456

Tutorial 19: CSS Positioning, Part II

Why not just use a table?

As we saw above, this technique is less than perfect. So, I hear you grumbling, why not just use a good, old-fashioned table?

Firstly, tables break the semantic structure of your document. Inserting tables wherever you want in a document means that your document becomes jumbled, and loses its structure. This can be bad for user agents that don't understand tables, and it also can be very bad for you and anyone else who is going to be maintaining your documents. Start inserting table elements haphazardly and your source will degenerate into an ugly and unmaintainable mess. It might look good in a browser, but it will look terrible in a text editor.

Secondly, this technique will cut down on your page sizes incredibly. Bandwidth is a hot commodity these days, for people hosting servers and especially for people on the wrong end of a dial-up link. Using tables for layout will quickly inflate your documents into huge monstrosities with all the extra tags you'll need. A CSS style sheet is short, easy to understand, and only has to load once when used in more than one page. The last bit is very important; if you have one style sheet being used for many pages, you will have immediately cut down on the amount of data transferred by your viewers.

Thirdly, this technique preserves backward compatibility. Browsers that do not support CSS will still display your document clearly and meaningfully. In this day and age of Web-browsing PDAs and cell phones, not everyone can display complex layouts and colorful fonts - what is important is the information. With CSS, you can make pages pretty for those who want them so, and keep them useful for everyone else.

index123456

http://www.internet.com/

Legal Notices.

URL: http://www.webreference.com/html/tutorial19/5.html

Produced by Stephanos Piperoglou
Created: March 08, 2000
Revised: August 15, 2000