Web technologies have always been misused, to achieve effects they were not (yet) designed to achieve. While a very common and natural drive in humans, and sometimes a very fruitful approach, creative use of computer tools has got important negative consequences on the quality of web products.
When the first graphical browser, Mosaic, was released, nobody talked yet about the layout of pages. It was a graphical user interface for an essentially text-based browser, and the web was still all about content. (Side note: content, and ASCII art--another creative use of technology that we humans can perceive and appreciate, while it makes no sense at all to the computer.)
The first additions of features like the ability to add inline graphics did serve information purposes, but it also triggered creative, unintended uses. Netscape 2.0 introduced tables, and things continued evolving dramatically in that direction. Proprietary extensions that were soon turned into the official HTML standard allowed webmasters to display tabular data, but their use was quickly repurposed. Tables, images, frames and font colors, designed as containers for a certain type of information, were (and still are) being used for visual purposes.
The frame was supposed to separate independent elements of content and to allow the rational display of content and navigation, or more generally of pieces of content that are related but of a different nature. The actual use was pretty close to the original idea: here the content, there the logo and main nav, here the footer and copyright notice. However, empty frames were quickly added to emulate various behaviors deemed desirable by someone on the project team: to display only one URL for the entire site (at some point, some considered it clean!), or to center the site's content in the browser window.
Similarly, tables were meant to organize information in lines and columns. However, it became clear pretty quickly that with invisible borders, tables could be organized to cut out regions of a controlled size in pages, to hold together in a visually satisfying manner various pieces of text or images, to selectively apply a background image or color, etc. More than abundant literature was written on the topic, and some graphic design packages even included the ability to produce table-based web layouts on the fly.
Again, inline images (i.e. embedded in the text) were intended to display, well, visual information: graphics, photos, logos, and the like. But those were soon repurposed to participate in layout and branding. Overall page visuals, as created by graphic designers, were being built out of bits of images put together in a totally meaningless manner--which looked good in a graphical browser. Large images containing everything (from the site's identity to its textual content) were a way to fully control the layout. But the crowing glory of this practice was the spacer gif, a 1x1 pixel image which conveyed strictly no information at all, but enabled HTML coders to control the behavior of tables quite finely.
Layers and scripts, <font> tags and other remnants of the first browser wars show the same the repurposing pattern.
Creative minds were applied to the problem of creating visually appealing pages with the limitations of the very inappropriate tools available. And creative solutions were found. And the web started to look good. Designers became more and more astute at using those tricks, and attained a certain balance in the efficient but totally unorthodox usage of the technologies.
The problem here is that each site was creating its own standard of information encoding. This essentially defeated the original purpose of HTML and neutralized one of its most powerful uses: packaging information in a way that the computer can process, even if the other major purpose, getting information across to users, was reached in most cases. Basing their work on the reality that most users would access the content via a certain browser, web builders started tweaking their input until they were happy with the output.
Ideally, all web sites should feature structurally correct markup: <h1> describing a top-level header, <blockquote> wrapping a quotation block, headers organized in a logical way, <strong> or <b> applied to mark emphasis, tables to display tabular data, etc. When you have this, you reach two goals:
But the actual practice was use to those structural elements for the visual effect they were having. And web designers would mix and match happily until the desired effect was reached, when viewed in a particular browser. Besides the enormously costly cross-platform discrepancies that arose from that practice, the consequence was HTML code that did not separate the content and its structure from the presentation.
All sorts of bad things happen when you do this, most of them related to the usefulness limits of non-intended use of technology:
Nowadays, content is often pulled from the database of some Content Management System, and the ugly structural-markup-for-visual-purposes could be part of the display template. In that case, the last consequence obviously no longer applies. But then you get something else:
And that does imply that you only used clean markup when maintaining content in your CMS, which is not always possible (for example, browser-based rich-text editors such as the very clever and powerful HTMLArea deliver terrible code).
So the case behind standards-compliant, structurally correct HTML markup is the following: because it makes use of the features of HTML as they were designed, it is efficient in what it does (describing the nature of various pieces of content that compose a document), and it is future-proof (if need be, good but deprecated markup can be easily converted to a newer version).
In the practice, this must serve as a warning against creative and entirely unintended uses of a technology in the domain of content management, storage and maintenance. Of course, we're talking here about taking this element into account in your decision process: in some cases, the short-term benefits may outweigh the long-term drawbacks. Sincerely going through the list of negative aspects above with then next few years in mind may help finding a site's sweet spot in this compromise.
Take some time to carefully review the costs of the drawbacks above:
In the context of a particular web site, the web builder will have to assess the importance and relevance of the various factors influencing the technical realization. The checklist above can help, but many other factors come into play, such as the intended audience and its social and technical characteristics, the expected lifetime of the site, as well as its lifecycle (the way it will be built, used, reused, and archived or destroyed). And the cost of standards-compliant building must be taken into consideration.
Regarding costs and efforts, here are a few hints:
In some cases, you might decide that the standards-compliant route is too expensive and too troublesome for your project.
Building for an intranet with a very controlled park of machines and browsers is not really an argument against standards-compliant building, but may only be considered in combination with other, more compelling factors. Indeed, while designing for one browser may save a bit of effort, or provide extra possibilities, it also increases the reliance of the site on external factors you have no control over: not only could the browsers change, following a company-wide policy reversal, but the company making the browser could choose to evolve the software's technical characteristics in future versions. With standards-compliant code, you're safe in both cases.
The single most relevant reason for building a site that is not standards-compliant is time: if you are creating an event site which will be taken offline within a few weeks or months of its inception. In that case, layout and content will probably be extremely tightly integrated (as in "rich media" sites...), and you won't care much about the drawbacks mentioned above.
However, in most other cases, there is simply no reasonable business case to be made for non-standards-compliant web building, as it is very costly in the long term, while not being necessarily expensive in the short term.
Just switching over to such building methods isn't simply a case of reading a few good books and "doing it". You have to want it, and to rehearse a lot. In the practice, watch out for the following:
For project managers: W3C tips to set up a standards-compliant web site and to choose a web agency.
Much is already available on what is actually needed for standards-compliant web building, particularly from A List Apart and in Zeldman's book (primarily targeted at graphic designers making the switch from a paper-based approach).
For the more technical people: The web standards project's blog about standards-compliance, and the W3C validator.
Comments
Bandwidth
Designers should always strive to make their site as lean as possible. I still see BMP files used on the web! A compressed image format should always be used instead as the files will be much smaller. I also see large images scaled down by the code to fit a smaller size. These should be resized in a graphics program first. (Some designers like to use actual full-size photographs as thumbnail images. A very bad habit - I always press the STOP button on my browser when I see these loading. Perhaps the designers think it's cool how the photographs appear instantly when you click on the thumbnail (as the image has already loaded!) or they just don't know how to resize them.)
Code such as PHP should also be made compact. I often update my code when I find a way to make it smaller or faster.
Bandwidth should be considered an issue because not everyone has broadband! A lot of people seem to ignore this fact, thinking you must be daft not to upgrade from a 56K modem, but not everyone can. (Broadband may not be available where the user lives, or they cannot afford the monthly fee.) So if you use a lot of large files, your site will be slower for non-broadband users. And what about mobile (cellphone) speeds? Again they are likely to be quite slow.
Re: Bandwidth
bandwidth does matter, and revisiting your code
Standards compliant code (be it HTML or some programming language) has one important advantage not mentioned here: when you or somebody else has to revisit the code five years later, it is esier to figure out what the code is intended to achieve.
None
There are a few unmeasured costs of XHTML that articles like this one often fail to mention:
1) Training: Many companies cannot afford to change gears midstream, and many employees are not willing to stick their necks out to implement new technology. It takes a really strong position to advocate web standards at a bank for example. Getting folks fluent (not just enthusiastic has a bottom line dollar cost)
2) A clean break from existing technology is necessary if you're using any kind of application methodology. This can be insanely difficult on legacy systems, even those of moderate compexity.
3) Future resistance? Despite the recent success of FireFox (I'm a user), the vast majority (and I mean VAST) are still using a Blue E for browsing the Internet. M$ has put fourth the most meaningless press release I have ever seen about IE7. They included NO details about what IE7 was going to be. It may break standards, in which case we'll find ourselves in quite the delimma.
4) Beyond bandwidth and Gov. compliance (both good things), there are only a few compelling reasons to convert existing commercial sites (WAP brower compatability? Is that a big money maker for most business websites?)
While I agree that we should be moving towards web standards, they are not the panacea that many developers put them fourth to be. I would never architect a new project without using web standards myself, but I think sometimes looking at the business impact of new technologies. I support web standards, but I think it's also important to look at some of the challenges that are making implementation so slow. Are there any I missed?
Jonathan
The price of new technology vs. known stuff
Clearly, an application that can't generate standards-compliant code, or for that matter that has difficulty changing the type of code it produces is a hazard, and a major hurdle. Internal applications in general do obey different rules, because of this control that the IT department feels it has on the whole environment--control that is often abused (thereby creating significant interdependencies between different parts of the infrastructure, where none need to exist).
However, while I quoted the searchability with Google and the public internet in mind, it seems obvious that information pages on an intranet that aren't searchable because of the way they're organized and coded, or a web application that causes its users to waste significant amounts of their client's time (following a crash or a major error in the interaction process) -- are both examples of costs that can be brought into the picture (this is not fiction, I personally witnessed both situations).
The current hot topic of folksonomies might ultimately render searchability moot, while good interaction design and quality coding might also be achieved with non-standards-compliant technologies. However, my point was: using technologies in the way they were intended to be used adds their power to your own goals, instead of merely allowing you to reach those.
IE-type HTML used in a 300-screens-long page containing all products offered by a bank is both bad design and bad thinking, and it's a major business hazard, leading to a significant waste of time and opportunities. Standards-compliance can be seen as the least important factor in fixing the situation, while being costly and difficult to implement, for the reasons you rightly mentioned, Jonathan. However, I see it as part of a package that ensures that technologies will actually support your goals. Yes, tables-based HTML gets information on a screen. But well-formed XHTML means you've thought about your information structure, can be parsed by the internal search engine spider, can be output to other formats than screen reading, can be maintained more easily, etc.
WAP browser compatibility sounds ludicrous, I must admit. But how ludicrous is it, to be stuck in a non-business setting with no internet access handy, with a potential big client nearby who's expecting to get actual information from you about your company's products or services, and to be unable to pull that information from the intranet because it's not possible to navigate it on your mobile phone (while it very well could be)? How ludicrous is it to have to equip your sales force with a certain type of PDA, regardless of the rest of its merits, because the company's intranet simply can't be accessed with non-IE browsers? How ludicrous is it to be unable to deal with a certain disability within your workforce, when it poses no other problems than the non-accessibility of the information infrastructure?
Yes, standards-compliant code has a significant cost, particularly in complex environments with important dependencies. But I believe that using technology in the way it was intended to be used ensures major benefits. And while getting the IT people at a bank to change their minds about anything at all is difficult, it seems to me that they have no valid point in sticking to a non-modular approach of the display layer.
brilliant article
maintenance
IE holding back the web for years
We can talk about standards all day long, but IE doesn't care about them. I will go as far as saying that this done on purpose.
- PNG, accepted in 1996 with its multi-bit alpha could have saved hundred thousands of work hours, simply because you would never have to worry about aliasing on the edges of your buttons, no matter what background they were on. Yet, it is not implemented in IE6
- Min/max height and width, a css standard for years, which would enable you to do layouts that scaled perfectly for big monitors yet wouldn't be rendered silly when scaled down, is not supported. How hard is this to code, I wonder.
- Box model still doesn't behave as w3 standards, div enlarges with floating content.
- The list goes on...
To remind the reader: Almost all except proper PNG support can be achieved using some hacks. The PNG hack is there but it is unacceptable for me. The thing is, MS could have activated that hack by default for all PNG images, yet they don't. Even if they supported png this very day to IE6 (which they won't, be sure of that), it would take 3-4 years before people would be able to implement it due to the old IE's flooding the world. I personally adhere to standards, but I don't have the face to tell others to use them, all because of the MS monopoly and its standing against standards.Re: IE holding back
two years later...
Heartfelt plea
I thought you should know about this.