Are You Deprecated?
Have you ever been deprecated? Well, I have. In fact, it happened just this weekend. Racing to get a Web page completed, I lost patience tweaking the CSS style I was employing to position an element correctly at several screen resolutions, in both Explorer and Firefox. So I slapped in a <center> tag and called it a day. I'm not proud of what I did. In fact, that very same legacy page contains more than a few stray <p> and <br> tags, not to mention a shocking number of border, width and even hspace attributes. Oh, the shame of it all.
There was a time not that long ago when I happily hand-coded pages in HomeSite using practices picked up in the 90's, oblivious of advances in Web standards. If something couldn't be positioned properly with a nice, nested <table> tag or two, then it wasn't worth positioning. An image needed to be moved down a tad? Well, that's why Tim Berners-Lee blessed us with the vspace attribute, right? Wrong. It now seems that for many years I totally misunderstood the true nature of HTML, which was to provide structure for a document by organizing it into identifiable elements, such as headers, sub-heads, paragraphs and lists. While CSS (Cascading Style Sheets) was the one true way for formatting these elements via styles collected within style sheets.
It actually makes perfect sense, when you think about it, especially when you get a sense of the advantages such an approach can bring both to your workflow and the quality of the layout. I avoided CSS in the early years partly because of the innate limitations common to any new specification. Then as it matured the issue became the lack of full or reliable support across platforms and browsers (insert sarcastic comment about Internet Explorer here). While it wasn't an issue for me, those using tools such as GoLive and Dreamweaver were less than thrilled about the degree of CSS support provided by such visual Web creation applications. But CSS has become increasingly more robust, the current generation of site creation tools is very CSS friendly and Explorer... er, well, it looks like the upcoming version 7 will finally make the CSS shortcomings of its predecessors nothing but a bad memory.
So if you haven't fully embraced the CSS religion, now is an ideal time to get the faith. And if you're still doing so, to finally renounce the use of HTML tags that the W3 in its wisdom has placed on its death list, to be no longer supported at some point. Tags that they poetically dub as "deprecated". Farewell compact, readonly and archive, we barely knew ye.
There's certainly no shortage of CSS tools or learning material. Beyond Adobe's offerings (or even Microsoft's Expression Web), you shouldn't overlook simpler applications that place CSS at the center of the creation process, such as Westciv's Style Master. If you're looking for third-party help getting up to speed, the Web itself is quite naturally awash in tips, tutorials and great examples of what CSS can do, most famously personified by the long-running Zen Garden site.
When it comes to books, I've been working my way through O'Reilly's recent CSS: The Missing Manual, by David Sawyer McFarland. Even though I've been using CSS for years, it's primarily been for much of the same thing and I've only tapped a fragment of what's possible. And along the way I've picked up a few bad habits, even resorting from time to time to the frowned-upon use of inline styles (shades of the <font> tag!). So my current project is to go back to ground zero and make sure I'm following good, standard CSS practices. And then to really grok the fancy stuff, so I can place elements with pixel precision. To that end, I'm curently finding The Missing Manual one of the better such volumes, for starters because it's very dense, something I value in tech books: the thing is packed with non-trivial examples, sidebars that actually contain useful information, lots of links to external resources, etc. The presentation is also very thorough: I think I finally really understand when to use relative versus absolute positioning. And the tip on how to use single-pixel GIFs is killer (joking).
The journey to CSS purity is a long one, and takes place one small style at a time. Yes, painful lapses are inevitable. But I have seen the light, brother, and will not rest until I have cast out the demon of deprecation. To create pages that are... not necessarily stylish, but beautiful.