Chapter 1. Best Practices for XHTML and CSS

 

Great works are performed, not by strength, but by perseverance.

 
 --Samuel Johnson

In its early years, the Web wasn't exactly the most attractive thing on the planet. Created by and for nuclear physicists, hypertext was simply a means by which content-heavy documents could be shared over an open, distributed network. Needless to say, high-caliber design wasn't a top priority for the Web's earliest authors. In fact, HTML's much-used (and, as will be discussed, oft-abused) table element was created with one purpose in mind: the display of tabular data.

By the heyday of late-1990s' Web design, the "L" in HTML was often ignored. Many professionals felt that the code used to build Web pages wasn't a language per se and, thus, wasn't subject to the rules and restrictions of a real programming language. Besides, clients weren't paying for "compliant," "accessible," or "future-proof" code. In fact, many sites were produced with the requirement that they be "backward compatible." That was a misnomer if ever there was one because it simply required a consistent display in version 4.0 browsers or higher.

Browsers of that time were temperamental, to say the least. With poor support for the specifications written by the World Wide Web Consortium (W3C) — www.w3.org — you could count on a page rendering differently in Browser A than in Browser B. So, while many programmers were dimly aware of the "standards" the W3C produced, the browsers they had to support ...

Get Professional CSS: Cascading Style Sheets for Web Design, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.