Why use web standards?

19th August 2009

Web standards are the rules which dictate how the 'code' behind web pages should be written. They specify how the html tags should be ordered and which can nest within each other to ensure that the code is set out in a logical way.

However, web pages do not have to follow these rules to be viewable in a web browser. In fact, a web page can break every rule there is and a web browser will still try its best to display it.

Early web browsers

In the 1990's, when the Internet was growing rapidly, the strategists behind web browsers possibly took Postel's robustness principle too seriously. The principle states that one should "be conservative in what you send butliberal in what you accept".

At this time, knowledge of web standards was scarce and the browser's available were vying for a share of a seemingly lucrative market. Unfortunately, users only cared for a browser that 'worked' most often. This created a vicious circle of web browsers becoming more and more liberal and displaying even the worst pages as well as possible. This then meant that web page authors were not aware that their pages were of poor quality, from their perspective, the pages looked OK and so there was no need to learn more about how web pages should be built.

This strategy made web page creators lazy. Rather then write valid content, it was easier to just test in the most popular browser to see if their work looked OK.

Validation is still low priority

Today, almost all of the most popular web sites fail web page validators. Using the HTML validator add-on for Mozilla Firefox I found Google.com to have 67 errors and 5 warnings, Yahoo.com to have 210 errors and 10 warnings and Amazon.com to have an incredible 2344 errors and 20 warnings.

Clearly web standards are not the top priority for commercial companies. Why should they be? Amazon's goal is to sell. Having valid or non-valid pages does not make any difference to Jeff Bezos and his company. As long as products are being shipped the company is achieving its goal.

To ensure Amazon's pages conform to validity checkers would take a lot of time and programming effort, which might be better spent fixing bugs or building new features. On the other hand, there are several benefits to making web pages validate correctly:

1) Accessibility

By following web standards, accessibility is improved on all Internet devices. If the tags and code are laid out in a way that makes sense to the device that is being used to browse the web, all of the device's features can be used in full. This may include techniques ranging from increasing the text size and saving bookmarks to reading content aloud or printing out.

By sticking to defined standards you are ensuring your site will work in the best possible way for those people that rely on those extra features.

2) 'Primitive' web devices

Modern web browsers can handle almost any content, but what about the older web browsers such as Internet Explorer 6 or Netscape 4? What about mobile phones, ebook readers, web kiosks, games consoles, interactive fridges, cookers etc. To ensure your site works on all devices without doing a huge amount of testing you should validate your pages.

Don't be fooled into thinking that primitive browsers can be ignored because they make up only a small percentage of your readership, web browsing on mobile devices is increasing and will continue to as the technology becomes cheaper and devices such as mobile phones come even better equipped to browse the Internet. By validating your pages your site is already prepared for the next big thing. When people start browsing the web using their watch or screens built into bus seats, your web site will be ready.

3) Efficiency

Valid pages, are usually created by hand without the cruft which is inserted by web page software such as DreamWeaver. This makes pages shorter and more concise, meaning loading times and bandwidth usage will be reduced. If your pages become popular, this savings are multiplied by each visit, which could mean large savings on your hosting bill.

The rendering speed of a web browser is also affected by page validity. A web browser takes a little extra time to render an invalid page compared to the snappy rendering of a perfectly formed page.

The speed with which a web page renders is a factor in how fast your web site feels to your users. Google research [pdf] recently showed that even a half second of extra loading time can make a big difference in a site's bounce rate. An improved rendering speed therefore means there is more chance your users are going to stay on your site.

4) Future development

Web pages often get redesigned, by building pages with web standards, you are helping to ensure that your next change will be a simpler operation. When a page is set out logically and correctly, the chances of being able to re-create a new look largely through CSS rather than editing the HTML is much higher. Furthermore, new staff or contractors will find it easier to get started when they see that the pages are laid out logically.

Web standards at LogicFlip

Here at LogicFlip we have a passion for web standards and not just for the reasons mentioned above.

To us, a page that validates is a page to be proud of. When browsing the web, a validated page tells you that the page was developed by a contentious developer, who spent time and effort creating it in a way that is accessible and useful to as many people as possible. It is a big statement for a simple green tick, but one which helps to identify the members of the web development community who care about the work they do and are actively trying to improve the way the Internet works for their visitors.

That's what the Internet is all about isn't it? Bringing groups of people together to work toward a common goal, a goal which benefits everybody.