Web Standards

There has been a lot of discussion about HTML 5 with many newbies asking about whether they should be learning that rather than HTML 4. In answering this question we need to not only consider when each of the different standards was actually adopted but also - when the browsers started supporting them, what the standards are actually for, and what other people are doing with regard to the standards.

The first thing we need to recognise is that the W3C is made up of representatives of all of the major companies that are actually producing web browsers for people to use to browse the web. The standards are therefore indicate what the browser manufacturers believe that browsers should support. Now browsers need to support the tags that existing web pages use even where those tags are no longer considered to be best practice and so the standards include a lot of tags that those creating web pages shouldn't be using.

Now with actual programming languages those constructs that should no longer be used are flagged as deprecated in one version of that language so that those using the language know that they shouldn't use it any more and should rewrite those sections of their code where it is used. The construct is then completely removed from the following version of the language as by then everyone has had plenty of time to get rid of their obsolete code. That the construct was deprecated indicates that it is both obsolete and that the following version will no longer support it.

Now HTML is being used by the general public and not just programmers and the general public have demonstrated that they have no idea of what deprecated means. Many of them are still using tags that were flagged as deprecated when HTML 4 became the latest standard in 1997. If HTML had followed standard programming practice then HTML 5 would have been developed around 2002 and those deprecated tags would now b e a remote memory. Since the adoption of the web by the general public the actual standards that is being defined by the browser manufacturers going forward has become far less a matter of best practice for use in web pages and more a matter of all the things that the web browsers need to support in order that web pages created by anyone will continue to work regardless of what tags that they used to create the page.

For this reason the new standards will now continue to support all the tags formerly deprecated. Their status has now been downgraded and instead of being deprecated for removal in the next version they are now merely obsolete. While being obsolete rather than deprecated indicates that the browsers will continue to support them it does not mean that they have suddenly become appropriate to use. None of the tags that were deprecated in HTML 4 are going to be best practice in HTML 5 and neither will those tags that didn't make it into the HTML 4 standard that all the browsers supported anyway and which have therefore been added to HTML 5.

The next thing we need to consider is when it became possible to use the various standards since it will have taken time after the standard was completed for all browsers to support it and then more time for everyone to finish upgrading to one of those browsers. In the case of HTML 4 the standard was introduced in 1997 and it became possible to actually use it in about 2005. Prior to that there were browsers still in use such as Netscape 4 which did not support sufficient CSS to be able to do away with all of the presentational HTML tags that best practice in HTML 4 had replaced with CSS. The XHTML 1.0 standard was introduced in 1999 and it will become possible to actually use it as intended once people stop using Internet Explorer 8 as Internet Explorer finally introduced support for XHTML in version 9 of their browser (they also introduced support for JavaScript in that version and so once IE8 dies it will also become possible to drop all the feature sensing code that determines whether the script is being run as JavaScript or as JScript). At the time of writing this the percentage of people using old versions of Internet Explorer is still too high to even predict when XHTML 1.0 will finally become usable.

With respect to HTML 5 the standard is still in draft and subject to change and so no current browser can support that standard except by accident as the standard does not yet exist. By implementing some of the proposed standard in their browsers those developing the new standard have the opportunity to find out how their proposed changes work in practice. They can then amend the proposed standard to delete or change those things that do not work properly. The problem with their doing this is that if too many people actually start using something that is proposed and that proposal is changed then there is the potential for the change to break a lot of web pages. This happened with the CSS box model and IE5 where the browser implemented a proposed version of the box model and the final standard was different. IE then had to implement quirks mode in order to ensure that all these web pages that made use of a feature in live pages that was only supposed to be used for testing could still be correctly displayed.

If it seems that the browser take up of new standards is slow (8 years for HTML 4, at least 13 for XHTML 1.0 and presumably similar for HTML 5 - which is why dates of around 2025 are sometimes proposed as when it might be able to be used) the actual use of the new standards by the people creating web pages is even slower. Now to allow people the time to convert their web pages one piece at a time from one version of the standard to the next the standards allow for a transition stage between the different versions. The actual standards themselves are identified as "strict" and so the HTML 4 standard is also known as HTML 4 strict and the XHTML 1.0 standard that no one can actually fully use yet is XHTML 1.0 strict. The prior version of HTML that people were using before either of these standards were released was HTML 3.2. Therefore those still transitioning their page content from HTML 3.2 to HTML 4 are following the HTML 4 transitional standard (which has all of the things that are supposed to be replaced during the transition process flagged as deprecated). Those preparing for when XHTML 1.0 will become possible are also switching from HTML 3.2 and are using XHTML 1.0 transitional. Since this transition is from HTML to XHTML as well as getting rid of the deprecated tags, the XHTML 1.0 transition is also somewhat unique in that it allows the page to be treated as either XHTML or as HTML. Appendix C of the XHTML 1.0 standard specifies things that the new standard allows but which cannot be used while transitioning as they don't work in HTML.

The most surprising aspect of this is the huge number of new web pages that are created as transitional (and which therefore are using tags marked as obsolete in 1997 which became completely unnecessary by 2005) even now. These people do not seem to understand that new web sites should always be created using "strict" as that is the actual standard with the rest only being there for backwards compatibility with really old web pages. Based on this it would appear that HTML 3.2 will continue to be used for most of the web for the foreseeable future.

In one way the HTML 5 draft recognises that most web pages are still transitioning from HTML 3.2 and that 3.2 and 5 tags are likely to end up jumbled together in the one web page. They have done this by dropping the version identifier from the SGML doctype that optionally comes at the start of any document that is created using a standard that was developed in accordance with the SGML meta-standard. The doctype to use for pages using HTML 5 is equally appropriate for pages using HTML 2 (which was the first version of HTML developed using SGML) and so will allow all of the HTML 3.2 and HTML 5 tags to be jumbled together in the one page without causing any problems.

The biggest concern that those creating web pages who want to use HTML 5 therefore need to worry about is just when it will become a standard and therefore not be subject to further changes. Any HTML 5 tags they use before that will need to be monitored so that they can amend them if their use is redefined before the standard becomes final. Apart from that they could just jumble those tags in with whatever HTML 3.2 tags they are still using. Of course this only deals with what the browsers are expected to accept in accordance with the standard and for those intending to follow the actual best practice for their web page creation none of the HTML 3.2 tags will be appropriate to use and neither will many of the proposed new HTML 5 tags (at least not yet since many of them are being introduced for purposes that browsers have not yet implemented).

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate