Changed meanings in HTML 5

The draft proposal for HTML 5 specifies changed meanings for several HTML elements.

There are several things that can be said about these changes.

In the case of the noscript tag the proposed change makes complete sense since the noscript tag in prior versions of HTML was only allowed in the body of the page and that tag has been redundant within the body of web pages ever since the introduction of support for the DOM in JavaScript. the use of noscript wrapped around stylesheets in the head of the page so as to be able to style the page differently (in particular with regards to making elements visible that you want initially hidden where JavaScript is available) is in fact the only way in which this tag can serve any useful purpose at all. That the only use that the tag has is in the head of the page means that it makes sense to update the standard to allow the use of this tag in the head of the page. The only unfortunate thing is that they haven't deprecated the use of the tag in the body of the page where it now serves no useful purpose.

In the case of allowing style tags within the body of the page we have the complete opposite situation or very nearly. Placing the styles in the body presumably should lead to the styles being handled exactly the same as they would be if they were in the head of the page. The only circumstances where anyone would therefore need to place them in the body is where he tools they have available to them allow them access to update the content of the body of the page but not access to update the head of the page.

For each of the other tags mentioned it is only the semantic meaning of the tags that has been changed and here we have a significant problem. There is no tag in an HTML 5 web page to specifically identify that the page is written in HTML 5 and so unless there are tags or attributes used elsewhere in the web page that are only valid in HTML 5 it is impossible to tell which version of HTML is being used. While each of HTML 2, 3.2, and 4 each have a long form of the doctype tag that specifically identifies the version of HTML, HTML 5 only has the short form of the doctype tag which is equally valid for HTML 2 as for HTML 5 and so only the presence of tags or attributes belonging to a specific version of HTML will give a clue as to what version of HTML it is (and where all the tags are valid for all of those versions of HTML then it is impossible to say from the code if the page is using HTML 2 or HTML 5 or something in between).This is made worse by the fact that some people have been using tags that are specific to HTML 5 that have been available as proprietary extensions to HTML that most or all browsers support for quite some time and so the presence of HTML 5 only tags such as <embed> is still not a clear indication that the page is written as HTML 5. Without knowing which version of HTML the page is using you cannot tell for those tags whose meanings have changed in HTML 5 which of the two alternate meanings that the tag is intended to have.

There are two different ways that the proposal can be changed to rectify this problem. To partly rectify the problem, a difinitive way of identifying that the page is HTML 5 is needed. This would only partly fix the problem though unless this indicator were made mandatory for use with HTML 5 pages as otherwise it would still be possible to just specify the page without that identifier and then the ambiguity would still exist. Since changing the HTML 2/3.2/4 standards retrospectively is not possible (given all of the web pages written using those standards) it is not possible to require that the longer form of the doctype that identifies the version e used with those pages and so pages without the mandatory HTML 5 marker (which currently doesn't exist) you would assume that the tags were intended to have their old pre-HTML 5 meanings.

The better solution to this problem would be to define brand new tags for these new meanings rather than redefining the existing meanings of the tags. There would than be no ambiguity as to the meaning of those tags.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow