html 5: doctype to version

Author(s) and publish date

By:
Published:
Skip to 5 comments

At a regular pace, there are discussions about the need of versioning for HTML 5. The issue breaks down around a few points including identification of the language itself for different kind of user agents, and parser libraries. A while ago, I had published an overview of different methods to identify the HTML language.

Michael A. Puls II posted an interesting mail about doctype this morning. He's writing

In Opera, goto opera:config#CompatMode%20Override and set the CompatMode Override to 2. This will make Opera always use standards mode for HTML even if there isn't a doctype.

So,


<html>
 <head>
    <meta charset="utf-8">
    <title>HTML5 document</title>
</head>
<body>
    <p>This is an HTML5 document.</p>
</body>
</html>

would be rendered in standards mode.

He's warning people saying that:

What you will see is that on some sites, forcing standards mode breaks pages.

But add something interesting to me. (emphasis is mine)

Now, for HTML5 pages specifically, browsers could always force standards mode, but without the HTML5 doctype, there would have to be something like <html version="5"> so browsers would know when to force standards mode. However, <!DOCTYPE html> already accomplishes that behavior now.

It would help the HTML validators, syntax checkers to identify the intent of the author. It would also make it easier for writing converters. It would also ease people who wants to jump from HTML to XML back and forth.

Related RSS feed

Comments (5)

Comments for this post are closed.