Internet Technology Series: Standards-Based Development
by Matt Kayan, Web Developer
12/05/2007
This article will deal with web standards. What they are, why they are important, how the moving target of "current" standards leaves older browsers behind, and the problems related to using new standards which aren't yet in widespread use.
History
In 1994, Tim Berners-Lee founded the World Wide Web Consortium (W3C) with the aim of ensuring compatibility among industry members with the adoption of new standards. The industry has been struggling towards true compatibility ever since.
The W3C maintains the software standards -- "recommendations" -- for the Internet. These include HTML (Hypertext Markup Language) and CSS (Cascading Style Sheets). The concept is that whenever any browser sees certain code, that browser will have definitive, authoritative rules for how to interpret that code. However, the reality is that these standards are not uniformly implemented across all web browsers.
In the early days of the Internet, the people who were writing web browsers were trying to extend the HTML language, which was fairly rudimentary at the time. In many cases, the changes they made to the language would only work in their own browser. To center text, Netscape introduced a CENTER tag that wasn't understood in other browsers. Microsoft created a bgsound tag that would play an audio file in the background, but it only worked in Internet Explorer. These proprietary tags were created because there was no way to accomplish these tasks according to the current HTML standard. Additionally, the browser companies tried to use the proprietary extensions to position their browsers as more capable than competing browsers.
Moving Towards A Standard
Some of these proprietary tags ended up being part of future HTML specifications, either because they were so widely used that they became a de facto standard, or because they filled a need that the specification writers recognized. Other proprietary tags were slowly and quietly abandoned.
Once a new web standard was published, the browsers needed to be updated to take the new rules into account. However, the browser companies also wanted to maintain support for their proprietary tags. And so after spending some time updating their code, the browser companies released new browsers. These usually, if not always, fell short of complete standards compliance. Additionally, the new browsers still contained vestigial support for many of their deprecated proprietary tags, which resulted in decreased pressure on web page authors to comply with the new standard.
In addition to HTML standards, the browsers have a complementary and slightly newer standard to support. The first CSS specification appeared in 1996, with the aim of adding style to a web page without bloating the HTML itself. CSS did this by introducing a whole new set of grammar, adding new complexities for browser vendors to integrate into their browsers.
In contrast to HTML, whose features tended to show up in browsers before they appeared in an accepted recommendation, more CSS behaviors seem to have appeared first in an official specification. At this time, CSS 3 is a collection of standards under development providing ways to do new things with our web pages using simple code including:
- Apply multiple, layered backgrounds to an HTML element
- Add shadows to boxes and text
- Apply rounded borders to boxes
Forward Looking
While CSS 3 has some tools that web developers would love to use, there is a barrier. Most users are not yet using a browser that supports the new CSS. I'd love to type a line of code and use a rounded text around a block of text, but only people using cutting edge browsers will see it. Older browsers may show a border with square corners, or perhaps no border at all.
At what point do we adopt the use of a new standard? When a simple majority of users' browsers are compliant? What if 25% of visitors to your site don't see the site design correctly? 10%? 5%? The decision hinges on what browsers your audience is using, what older browsers will display, and how comfortable you are with there being a difference. This dilemma has been repeated over and over again ever since the publication of the first web standard.