Smarten Up Your Code
By Phil Stevens
Computers are dumb. That's a good thing, because if they thought for themselves we'd be in trouble. Ideal systems do exactly what they're instructed to do, nothing more, and nothing less. Programming languages, networking protocols, and now the interchange of information on the Internet all depend on the underlying systems to follow instructions without getting creative. Of course, there's a corollary to this assertion: If you expect a dumb machine to do something complicated, that means you have to give it very good instructions. The best way to ensure that you give good instructions is to use a predictable, standardized language.
HTML was initially supposed to be a simple, platform-independent means of instructing Web browsers in how to interpret hypertext content. But ever since the early graphical browsers came on the scene, HTML has been abused (some say "extended") to act as a set of presentation instructions. These abuses include: Coding multiple instances of a site, optimizing for the various quirks of different platforms; and trying to implement style sheets even though many browsers have differing opinions of how they should render them. Now Web designers face unpleasant, time-consuming tasks to undo this misuse. There's no easy or quick way out of this mess, either, but at least we have a good path laid out with the adoption of XHTML 1.0.
Everyone Needs Validation
So how can a well-intentioned Web designer make code as clean as possible and still achieve the desired results? Three important steps to success are: understanding the current HTML standard, validating all HTML code, and testing it on as many browser/platform instances as possible.