Cascading Style Sheets (CSS) describe the style or appearance of elements on a Web page. You can use CSS to redefine the way the browser displays an HTML tag or sequence of tags, or you can build entirely new styles and apply them to whatever pieces of content you like. In this regard, CSS is extremely useful in separating the structure of a documentthe purely technical description of a Web page that identifies individual pieces of content as particular elements, or types of things: paragraphs, images, headers, quotes, and so onfrom the presentation of the documentwhat each element looks like in a browser.
When HTML first came out, it was supposed to be a structural language, with the browser software determining what each element looked like. The role of a Web builder was simply to identify what pieces of content were which types of thingsthat is, to describe the structure of the pageand the browser handled the presentation. Graphically savvy Web builders found this way of working unacceptable. They demanded more and more control over the look of a Web page, until HTML itself became a mishmash of structural elements and presentation elements that had nothing to do with structure at all. To coding-minded Web builders like the fine folks at the W3C, this way of working was equally unacceptable. Enter CSS, which, at least in theory, satisfies both types of Web people. The graphic heads get more and better design choices for pixel-perfect control over how a Web page looks, and the coding heads have a way to reclaim HTML as a purely structural language. The downside is that, although CSS has been around for years, it is still an emerging technology. Graphic heads were slow to embrace it, because it is very code-oriented, and it is harder and less intuitive to use than HTML markup. It assumes a level of technical understanding that many visually oriented people never possessed and never bothered to learn in the frenzied days of dot-com startups and IPOs. Further, browser makers like Microsoft and Netscape didn't feel compelled to support CSS with anything like consistency or completeness.
These days are slowly drawing to a close. CSS now enjoys a passably acceptable level of support in the major browsers, so using it effectively has become at least feasible. However, since CSS is nowhere near as stable as the much-maligned HTML presentation tags, he who dabbles in CSS must test and test and test his pages in a variety of browsers to troubleshoot the inevitable glitches, bugs, and inconsistencies that crop up.
|