Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Obsolete vs. Deprecated HTML

Tags:

html

What is the difference between the terms "obsolete" and "deprecated" with regards to HTML? I seem to be seeing a lot of elements being flagged as "obsolete" in HTML5...

like image 474
Cameron Christensen Avatar asked Aug 02 '12 19:08

Cameron Christensen


1 Answers

In the HTML 4.01 specification, clause 4.1 Definitions defines “deprecated” and “obsolete” as technical terms. Briefly, a deprecated feature is something that you should not use, but browsers should keep supporting it. An obsolete feature is something that is just listed for historical purposes, not defined, and no browser support is required (though in practice it typically still exists). HTML 4.01 declares most of the old presentational elements and attributes as deprecated. Only a few very elements of little importance are declared as obsolete there.

In the W3C HTML5 draft, the terminology is different. It does not use the word “deprecated” at all (except when referring to the use of this word in HTML 4.01). It does not define “obsolete” as a technical term (as applicable to features of HTML), but it uses the word a lot. The word is implicitly defined in the 11 Obsolete features section. The draft tells, with somewhat varying tones and specialties depending on features, authors not to use obsolete features but expects browsers to keep supporting them. It also contains detailed descriptions of their syntax and semantics, partly even more detailed than in older specifications.

In the HTML5 draft, most of the obsolete features are also classified as “non-conforming”, with the statement that they “must not be used by authors”. These features cover most of the features that are deprecated in HTML 4.01, and some more, including features that were not in HTML 4.01 at all.

For example, the font element is deprecated in HTML 4.01, obsolete in HTML5. So in principle, HTML 4.01 you should not use, HTML5 says you shall not use it (and HTML5 validators are told to issue error message, not just a warning). In practice, the difference is smaller, mostly just a matter of principle. Browsers are still required to parse the element and add it to the document tree, and they are expected to implement it as before.

like image 187
Jukka K. Korpela Avatar answered Nov 15 '22 22:11

Jukka K. Korpela