HTML 5 and Web Browsers

HTML 5 has taken a completely different approach to defining HTML to that taken with earlier versions. Prior versions of HTML attempted to not only define those tags and attributes that browsers should recognise but also made the assumption that HTML could be treated like a programming language with tags being marked for removal from future versions of HTML.

With a programming language those parts of the language that were replaced by a better way of doing things two or three versions ago will no longer be supported in the latest version. When the better way was introduced the old way was marked as deprecated and everyone was expected to stop writing new code using the old way and to look at updating their code to replace all the code they had that used the old approach with the new one during the period prior to the release of a version that no longer supports the old way. As most people writing programs understand that this is the process there are very few instances where people are still trying to run long obsolete code when the version comes out that no longer supports it.

With HTML it is very different as a lot of HTML is written by people who have little idea of what tags are meant to be used for what. While HTML 4 has been around as an actual standard since 1997, most web pages on the web still use HTML 3.2 and very few have completely upgraded the HTML to only use HTML 4. Only where you find a web page using an HTML 4 strict doctype and the page validates with that doctype do you have a web page that is actually using HTML 4 and is prepared for browsers to drop all of the tags that were determined to be unnecessary and which were therefore flagged for removal from HTML in that version. The HTML 4 transitional and frameset doctypes do not mean that the page is only using HTML 4, those doctypes indicate that the page is transitioning from HTML 3.2 to HTML 4 and still uses some HTML 3.2 tags and attributes.

Part of the problem with actually transitioning to HTML 4 was that while HTML 4 became a standard in 1997, there were still a lot of people using browsers that didn't fully support it until long afterwards. In fact it is only really the death of Internet Explorer 7 that means that all popular browsers now support HTML 4. Web pages wanting to support certain features where HTML 4 presented a new way of attaching those features and where there were still popular browsers that didn't support those features had to use a transitional page and the older way of attaching that feature in the pages where they wanted to use it. Other people with less knowledge of the actual standard would copy the way others had written their code several years earlier before the standard way was fully supported even after all browsers did support a given standard and so there are many web pages that use tags that had become obsolete when Netscape 4 dies in new web pages that they are writing even now.

HTML 5 has recognised that there are many people using HTML who don't understand anything about how standards are supposed to work and who are using tags because they work even though they were flagged for removal over fifteen years ago. With HTML 5 therefore any tag that is used by lots of web pages is no longer flagged for removal from HTML but is instead simply flagged as obsolete (or in some cases where those working on HTML 5 do not themselves realise that HTML 4 provides a better alternative that is now fully supported by all popular browsers the tag may not even be flagged as obsolete so that HTML 5 provides multiple valid ways to do the same thing even though one is far better than the other).

The thing to remember is that the HTML standards are and always have been intended for the browsers to implement - they were not intended to indicate what should be used by those trying to mark up their web pages properly. In fact by telling the browsers to support all of the tags in popular use and marking some as obsolete HTML 5 is the first version of HTML to even start to provide those marking up their web pages with a guide to some of the tags that they should no longer be using (in HTML 4 the deprecated tags were ones that the browsers could start preparing to drop support for because no one was expected to till have web pages that used them by the time of the next version release). Even with HTML 4 not all of the tags and attributes that the browsers were supposed to continue to support were ones that people ought to be using in new web pages. HTML 5 simply makes the need to determine the subset that should be used by those trying to write their web pages properly more necessary since at least most of the tags and attributes in HTML 4 had situations where they ought to be used. There were only a few tags and attributes that HTML 4 allowed that served no purpose and which should therefore no be used in new web pages by anyone trying to use HTML properly. HTML 5 has simply increased the number of tags and attributes that browsers are required to understand which should not be used in new web pages that are properly written.

Basically HTML 5 acknowledges that there are a huge number of web pages being created by amateurs who have no interest in learning how to properly use a markup language and who will therefore use any tag or attribute that works regardless of whether it is the best way (or proper way) to achieve the particular result. Those people are constantly creating new web pages using HTML that ought to be long dead - such as still using the embed tag even though the last browser that required that tag be used instead of the HTML 4 object tag was Netscape 4 or still using the iframe tag even though the last browser to not fully support using an object tag for that purpose was Internet Explorer 7 (and the only issue with using object to nest web pages in IE7 was the inability to turn off the border around the object).

This doesn't mean that professionals creating web pages should suddenly start using all the tags and attributes that HTML 5 says that browsers should support. The browsers that required the use of embed and iframe are still just as dead with HTML 5 as they were with HTML 4 and the reasons for replacing those tags with the object tag in HTML 4 still exist in HTML 5. HTML 5 supports those tags so as to not break all the pages written by amateurs.

HTML 5 does introduce a lot of new tags and attributes that are appropriate to use in new web pages. While it appears at first glance that the new video and audio tags are unnecessary because all browsers now support attaching video and audio using the object tag, a closer look shows that browsers required a plugin to be installed (eg. flash) to be able to play those files when attached using an object tag whereas the new tags allow the browsers to supply built in support for playing files in specific formats. Most of the new HTML 5 tags and attributes associated with forms are perhaps amongst the most useful additions to HTML - the combobox in particular is one form field that really ought to have been included in HTML much sooner. The use of some of the other new form field types becomes more obvious once you take into account mobile devices where the type of data to be entered can help select the most appropriate keyboard to display on the touch screen to allow data to be entered into the field.

Unfortunately, there is no one actually working on determining the sub set of HTML 5 that should be used by professionals creating web pages and no way to indicate that a web page has been written specifically using the useful subset of HTML 5. This means that it is basically left to the individual to decide what parts of HTML 5 to use in their own pages and they have to use the same HTML 2+ doctype as is recommended for use by all the HTML 5 web pages written by amateurs.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow