Professional programmers working in a controlled environment know exactly what 'deprecated' means. They know that commands flagged as deprecated should no longer be used in any new code that they write and that they need to consider how to replace any existing use of the command within a reasonable timeframe. While their current environment still supports the command in order to give them time to rewrite any code that uses it, they know that the next time that their environment gets a significant upgrade that the deprecated commands will no longer exist and that if they haven't replaced all of the code that uses deprecated commands by then that their code will fail.

As late as the introduction of HTML 4 in 1997 it was still considered reasonable that the same situation should apply to languages such as HTML and JavaScript that run in web browsers. Those HTML tags and attributes that were no longer needed with HTML 4 (having been replaced by alternative tags or by CSS) were flagged as deprecated. The intention was that people would stop using them in their new code and rewrite their existing code to get rid of all references to them before the next version of HTML was released.

There were a number of problems with applying the concept of deprecated tags and attributes in HTML. These can be broken up into three groups.

The first group of issues relate to the browsers themselves. The browsers - particularly around the time HTML 4 became the standard - were competing for market share and supporting the new standard wasn't high on their list of priorities and so some parts of the standard didn't get implemented all that quickly while other tags and attributes the browser creators thought would help improve their market share were implemented instead. Because some browsers didn't support all of the new commands it was necessary to continue using the deprecated ones as otherwise you wouldn't get the required result. It took about ten years for all of the new browsers to support the necessary CSS to allow HTML 4 to be used without needing the deprecated tags and attributes.

The HTML standards did cater for this in part by introducing a transitional doctype that could be used for web pages where some of the supported new HTML 4 tags and attributes were to be used but where some of the deprecated tags and attributes also needed to be used because their replacements were not supported yet. The intention was that people would switch from the transitional doctype to the HTML 4 strict doctype once all browsers supported HTML 4.

The second group of problems were caused by the browser owners - those using the browser to access the web pages. By the time HTML 4 became the latest standard many people wanting to use the internet had no idea of what a browser is. There was simply a button on their screen that they clicked to access the web. Just which browser that was didn't concern them as they had no idea that different browsers existed and that the one they were using might not be the best one for their purpose. Worse, they had no idea that it was necessary to upgrade their browser. As earlier browsers didn't upgrade themselves automatically this meant that many people would be accessing the web using really old browser versions. For example it was only in about 2006 that the number of people using the Netscape 4 browser fell to the point where that browser could be ignored. Similarly Internet Explorer 6 and 7 needed to be considered as recently as 2012. Since Internet Explorer 8 was the first version of that browser to support all of the CSS necessary to be able to actually use HTML 4, the time in this instance from when the standard was released until it became really practical to use was fifteen years. The alternative the HTML 4 that was released at the same time (XHTML 1.0) was not supported at all even by Internet Explorer 8 and so cannot be used until use of that browser ceases completely.

So transitioning from earlier versions of HTML to HTML 4 could not be completed until 2012 at the earliest. This provided plenty of time for people to create millions of web sites without really knowing what they were transitioning from or to and why certain tags and attributes that were flagged as 'deprecated' still needed to be used. This in turn led to the third group of problems with those creating the web pages not keeping track of when it was no longer necessary to use deprecated code. As a result web pages continued to be written using deprecated code after the need for that particular deprecated code ceased to exist and the concept of rewriting old pages to get rid of deprecated code that was needed when the page was written but was no longer necessary didn't even occur to these authors.

Some effort has been made to re-educate those writing web pages to encourage them to stop using some deprecated code. There has been some success in this area. While not deprecated for displaying tabular data, all of the table tags were deprecated in HTML 4 with respect to page layout - there being several alternative ways to define how the page should be laid out provided by CSS). After many years of effort most people now realise that they shouldn't be using table tags to control their page layout although some have proprietary taken this too far and don't use tables for tabular data either (which is where they should be using them). Attempts to get web authors to stop using iframe and embed tags and to use the standard object tag instead has had little success. This was helped along by the fact that IE8 was the first version of that browser to support the object tag properly (although nesting two object tags could achieve the same result in IE6).

Because we now have a huge number of web pages still using tags flagged for removal in 1997 and generations of web authors who have no idea of what 'deprecated' means, the idea of actually carrying out the next step and removing all of the deprecated tags and attributes in HTML 5 was abandoned. Instead those tags and attributes are now simply flagged as obsolete. This still hopefully conveys the idea that you shouldn't be using them in new code but without the requirement that you rewrite old code to get rid of them as obsolete tags and attributes will continue to be supported for all of the old pages that still use them.

Tags and attributes in HTML no longer get deprecated and so it can no longer be said that there will be a point in the future when browsers stop supporting a given obsolete tag.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow