HTML 4 or HTML 5

While HTML 5 is still some way from becoming an actual standard, most modern browsers now support at least some of the new tags it is proposed to introduce. Where the new tags have both proved to be actually useful (by providing new functionality) and where all modern browsers support the tag it seems unlikely that the specification of the tag will change much prior to its adoption as a standard and that particular tag can be considered safe to use in web pages.

On the other hand those proposed tags which simply replicate the functionality of existing tags or where HTML 5 has two or more proposed ways to achieve the same end result it is far more reasonable to expect that those tags will be either removed or significantly modified prior to HTML 5 becoming a standard and those tags should therefore be avoided.

There is of course a third group of tags - those that introduce a new way of semantically specifying the parts of your page that will allow the page to be better interpreted by third party software. Whether you implement this group of new tags into your page will depend on how much difference you think it will make to how third party software currently reading your page will treat the content.

In other words you need to be selective as to which of the proposed new tags that you currently consider using in live web pages.

Since the doctype tag currently proposed for use with HTML 5 is equally valid for HTML 2 through 4, that doctype does not allow you to validate your page without separately identifying which version of HTML to validate as. Even when you specify that you want to validate as HTML 5 the validator would not distinguish between useful tags and those which will hopefully be removed before the standard is approved. This means that it is probably more effective currently to validate the page as if it were HTML 4 or XHTML 1.0 knowing that the one or two HTML 5 specific tags that you are using will report as invalid rather than attempting to validate as HTML 5.

Let's consider a few HTML 5 tags and see which of the three categories I have define that they belong to so as to determine whether we ought to consider using them of not.

The last browser to not understand the standard object tag introduced in HTML 4 was Internet Explorer 6. That IE6 required a proprietary attribute on the object tag that would stop it working for other browsers made the proprietary embed tag that all browsers supported but which was never a part of the standards an easier alternative. The only way to avoid using the embed tag and to still support IE6 was to use two object tags and IE conditional comments. The last browser to not understand the object tag at all and to only support the embed tag was Netscape 4. Back when IE6 and Netscape 4 were the two most popular browsers it made sense to use the proprietary embed tag. Now that both of those browsers are dead there is nothing to prevent web pages being written to use just a standard object tag. That HTML 5 has proposed introducing the embed tag into the standards when the last of the browsers that had any use for that tag are now dead just means that those who made the proposal do not understand anything about the current standards and how it is supported by browsers. Those people are probably amongst the vast majority still writing HTML 3.2 who simply think that they are following the current standards.

The new header, footer, article, aside etc tags will make it far easier for programs reading the page source to determine what part of the content is which. At the moment the only programs of any significance that read web page source are the search engine spiders but once these tags become commonplace we will probably see far more software that makes use of them. Just how much use that the search engine spiders will make of these new tags in identifying what parts of the page to look at in working out what the web page is about will only ever be known to those who work for the search engine companies. While not all currently popular browsers support these tags properly I think it is a little early to consider using them. This situation may change once everyone is using browsers that do support them but even then it will only be a small percentage of pages that use them as most of the web still uses HTML 3.2 even though HTML 4 became a standard in 1997.

The new video and audio tags provide new functionality to HTML in that they do not require a third party plugin to be installed into the browser in order to attach video or audio files the way that using the object tag to attach those files into the page does. As such it is perfectly reasonable to use these tags in your web page for their intended purpose. These tags even allow for browsers that do not yet support them in that you can wrap them around an object tag so that those with the appropriate plugin installed in browsers that do not support the new tag can still access the video or audio the old way via the plugin.

HTML 5 introduces a number of new form field types that vary in how useful that they will be. Probably the most useful of the newly introduced fields is the combobox. The date input field is probably the next most useful. While browsers still exist that don't support these new form fields you can emulate them by attaching an appropriate JavaScript to a standard input text form field. The appropriate time to scrap the JavaScript and make the minor changes to use the new form field will be that point at which you consider that support for the field in browsers is high enough that more of your visitors will be able to use the new field than have JavaScript enabled in order to use the JavaScript emulation. The point at which that will occur will depend on the percentage of your visitors who don't have JavaScript and the percentage of your visitors who are using older browsers that don't properly support the new fields.

Switching to using HTML 5 is not an all or nothing situation. There are a small number of HTML 5 tags where it makes sense to use them now in your web pages where you need the functionality of those tags. As time goes on and browser support improves the list of HTML 5 tags worth using when they are useful will grow. Once HTML 5 becomes a standard and everyone is using a browser that supports that standard then all of the useful tags in HTML 5 will be worth using as appropriate. Hopefully by that time all the pointless tags currently proposed will have been removed but if they haven't then they will almost certainly be flagged for removal in HTML 6 and so you can safely continue to ignore the existence of those tags.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow