html_5_doctype_to_version.html 14.8 KB
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css" media="all">
    @import "/QA/2006/01/blogstyle.css";
    </style>
    <meta name="keywords" content='doctype, html, html5' />
    <meta name="description" content="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..." />
    <meta name="revision" content="$Id: html_5_doctype_to_version.html,v 1.55 2011/12/16 02:58:42 gerald Exp $" />    
   <link rel="alternate" type="application/atom+xml" title="Atom" href="http://www.w3.org/QA/atom.xml" />
   <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="http://www.w3.org/QA/news.rss" />   
   <title>html 5: doctype to version - W3C Blog</title>

   <link rel="start" href="http://www.w3.org/QA/" title="Home" />
   <link rel="prev" href="http://www.w3.org/QA/2007/11/yet-another-design-in-w3c-team.html" title="Yet Another Design in W3C Team" />
   <link rel="next" href="http://www.w3.org/QA/2007/12/html5preview.html" title="&amp;lt;cite&amp;gt;Preview of HTML 5&amp;lt;/cite&amp;gt; at &amp;lt;cite&amp;gt;A List Apart&amp;lt;/cite&amp;gt;" />

   <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
         xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description
    rdf:about="http://www.w3.org/QA/2007/12/html_5_doctype_to_version.html"
    trackback:ping="http://www.w3.org/QA/sununga/mt-tb.cgi/107"
    dc:title="html 5: doctype to version"
    dc:identifier="http://www.w3.org/QA/2007/12/html_5_doctype_to_version.html"
    dc:subject="HTML"
    dc:description="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..."
    dc:creator="Karl Dubost"
    dc:date="2007-12-02T22:21:01+00:00" />
</rdf:RDF>
-->

    <!-- <script type="text/javascript" src="http://www.w3.org/QA/mt.js"></script>-->

</head>
<body class="layout-one-column">
      <div id="banner">
      <h1 id="title">
	<a href="http://www.w3.org/"><img height="48" alt="W3C" id="logo" src="http://www.w3.org/Icons/WWW/w3c_home_nb" /></a>
W3C Blog
</h1>
    </div>
    
    <ul class="navbar" id="menu">
        <li><strong><a href="/QA/" title="W3C Blog Home">[ W3C Blog ]</a></strong></li>
        <li><a href="/QA/Library/" title="Documents and Publications on Web and Quality">Documents</a></li>
        <li><a href="/QA/Tools/" accesskey="3" title="Validators and other Tools">Tools</a></li>
        <li><a href="/2007/12/qa-blog-help/index#feedback">Feedback</a></li>
    </ul>
<div id="searchbox">
<form method="get" action="http://www.google.com/custom" enctype="application/x-www-form-urlencoded">
<p id="formbox"><input type="text" size="15" class="textfield" name="q" accesskey="E" maxlength="255" /> <input type="submit" class="submitfield" value="Search" id="goButton" name="sa" accesskey="G" /> <input type="hidden" name="cof" value="T:black;LW:72;ALC:#ff3300;L:http://www.w3.org/Icons/w3c_home;LC:#000099;LH:48;BGC:white;AH:left;VLC:#660066;GL:0;AWFID:0b9847e42caf283e;" /><input type="hidden" id="searchW3C" name="sitesearch" checked="checked" value="www.w3.org/QA" /><input type="hidden" name="domains" value="www.w3.org/QA" /></p>
</form>
</div>


    <div id="main"><!-- This DIV encapsulates everything in this page - necessary for the positioning -->

                     <p class="content-nav">
                        <a href="http://www.w3.org/QA/2007/11/yet-another-design-in-w3c-team.html">&laquo; Yet Another Design in W3C Team</a> |
                        <a href="http://www.w3.org/QA/">Main</a>
                        | <a href="http://www.w3.org/QA/2007/12/html5preview.html"><cite>Preview of HTML 5</cite> at <cite>A List Apart</cite> &raquo;</a>
                     </p>

                        <h2 class="entry-header">html 5: doctype to version</h2>
                           <div class="entry-body">
                              <p>At a regular pace, there are discussions about the <a href="http://www.w3.org/html/wg/tracker/issues/4">need of versioning for HTML 5</a>. 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 <a href="http://www.w3.org/QA/2007/05/html_and_version_mechanisms">different methods to identify the HTML language</a>.</p>

<p><a href="http://my.opera.com/burnout426/about/">Michael A. Puls II</a> posted an interesting mail about doctype this morning. He's writing</p>

<blockquote>
  <p>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.</p>
  
  <p>So,</p>

<pre><code>&lt;html&gt;
   &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;HTML5 document&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;p&gt;This is an HTML5 document.&lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>
  
  <p>would be rendered in standards mode.</p>
</blockquote>

<p>He's warning people saying that: </p>

<blockquote>
  <p>What you will see is that on some sites, forcing standards mode breaks pages.</p>
</blockquote>

<p>But add something interesting to me. (emphasis is mine)</p>

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

<p>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.</p>

                           </div>
                           <div id="more" class="entry-more">
                              

                           </div>
                       <p class="postinfo">Filed by <a href="http://www.w3.org/People/karl/">Karl Dubost</a> on December  2, 2007 10:21 PM in <a href="http://www.w3.org/QA/archive/technology/html/">HTML</a>, <a href="http://www.w3.org/QA/archive/web_spotting/opinions_editorial/">Opinions &amp;amp; Editorial</a><br />
<span class="separator">|</span> <a class="permalink" href="http://www.w3.org/QA/2007/12/html_5_doctype_to_version.html">Permalink</a>
                                 | <a href="http://www.w3.org/QA/2007/12/html_5_doctype_to_version.html#comments">Comments (5)</a>
                                 | <a href="http://www.w3.org/QA/2007/12/html_5_doctype_to_version.html#trackback">TrackBacks (0)</a>
</p>



<h3 class="comments-header" id="comments">Comments</h3>
<div class="comment" id="comment-89610">
<p class="comment-meta" id="c089610">
<span class="comment-meta-author"><strong>Sam Ruby </strong></span>
<span class="comment-meta-date"><a href="#c089610">#</a> 2007-12-04</span>
</p>
<div class="comment-bulk">
<p>How would a version attribute make it easier people who want to jump back and forth from HTML and XML?</p>

</div>
</div>


<div class="comment" id="comment-89697">
<p class="comment-meta" id="c089697">
<span class="comment-meta-author"><strong>karl dubost, w3c </strong></span>
<span class="comment-meta-date"><a href="#c089697">#</a> 2007-12-04</span>
</p>
<div class="comment-bulk">
<p>Hi Sam,</p>

<p>in my mind, getting rid of the doctype is a good step for documents without XML DTD, plus the fact that it might create confusion for people. But indeed, it's not a straightforward improvement. </p>

<p>I wish there was a uniform syntax between the two serializations as well. That would be another step… more difficult this one.</p>

</div>
</div>


<div class="comment" id="comment-89909">
<p class="comment-meta" id="c089909">
<span class="comment-meta-author"><strong>Sam Ruby </strong></span>
<span class="comment-meta-date"><a href="#c089909">#</a> 2007-12-06</span>
</p>
<div class="comment-bulk">
<p>While not widely advertised, the DOCTYPE that HTML5 has provisionally settled on works with XHTML5 too.  Take a look at my web log, for example.</p>

</div>
</div>


<div class="comment" id="comment-90269">
<p class="comment-meta" id="c090269">
<span class="comment-meta-author"><strong>Grant Vergottini </strong></span>
<span class="comment-meta-date"><a href="#c090269">#</a> 2007-12-07</span>
</p>
<div class="comment-bulk">
<p>HTML was originally intended to be an easy, open, and lasting format for publishing documents on the web. Today, HTML has become a somewhat convoluted hair-pulling platform for building sophisticated web applications - like I build. I wish that HTML could split in two.</p>

<p>One path would present a well-defined application platform that is neither pro or anti any one vendor (such as Microsoft) and is supported and fully embraced equally by all browser vendors. The application platform would provide appropriate constructs for building applications - rather than abusing span, div, and tables to achieve the desired effect. </p>

<p>The second path would return HTML to its roots, allowing it to once again be a simple way to author documents. </p>

<p>Short of that, I would much rather see consistent implementation of the current standards over yet another round of "change" which only creates more issues for years to come until legacy browsers have faded away.</p>

</div>
</div>


<div class="comment" id="comment-111920">
<p class="comment-meta" id="c111920">
<span class="comment-meta-author"><strong>Griff Ruby </strong></span>
<span class="comment-meta-date"><a href="#c111920">#</a> 2008-02-07</span>
</p>
<div class="comment-bulk">
<p>One great thing that HTML 2.0 introduced was a strict versioning system so as to know exactly what standard a document is being written to, and from there enable user agents to derive some hint as to how to display it (e. g. the presence or absence of (!DOCTYPE) to determine whether to put a browser into "quirks mode").  In particular, if you intend to feed a file to a validating engine, that engine needs quite specifically to know exactly which standard it purports to be written to.
And if (!DOCTYPE) is to be reduced to a mere "quirks mode" deselector then it falls to the attribute VERSION of the (HTML) tag to set whether we are dealing with HTML 5, or 6, etc.
Or can we all be that cocksure that there will never be an HTML 6, or even a 5.1?
And for that matter, using an opening tag of (HTML VERSION="5") might make for a far better and more elegant way for IE8 to know when to invoke the fullest weight of standards mode than their proposed (META HTTP-EQUIV="X-UA-Compatible" CONTENT="IE=8") tag.  That latter simply sounds too vendor-specific, or are we to look towards introducing similar such vendor-specific tags for each of Mozilla, Firefox, Opera, Safari, and who knows how many other such lesser or newer user agent vendors?</p>

</div>
</div>



  <div class="comments-open" id="comments-open">
<h3 class="comments-open-header">Leave a comment</h3>

<div class="comments-open-moderated">
   <p>
   Note: this blog is intended to foster <strong>polite
   on-topic discussions</strong>. Comments failing these
   requirements and spam will not get published. Please,
   enter your real name and email address. Every
   individual comment is reviewed by the W3C staff.
   This may take some time, thank you for your patience.
   </p>
   <p>
   You can use the following HTML markup (a href, b, i, 
   br/, p, strong, em, ul, ol, li, blockquote, pre) 
   and/or <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a>.</p>
</div>

<div id="comments-open-data">
<form method="post" action="http://www.w3.org/QA/sununga/beach.pl" id="comments-form">
<h4>Your comment</h4>
<div id="comments-open-text">
  <textarea id="comment-text" name="text" rows="20" cols="100"></textarea><br />
<label for="comment-text">Write your comment text here. Remember, keep the discussion on topic and courteous.</label>
</div>

<h4>About you</h4>
<div id="comment-form-name">
  <input type="hidden" name="static" value="1" />
<input type="hidden" name="entry_id" value="116" />
<input type="hidden" name="__lang" value="en" /> 
<label for="comment-author">Your Name</label>
<input id="comment-author" name="author" size="30" value="" />
</div>
<div id="comment-form-email">
<label for="comment-email">Your Email Address</label>
<input id="comment-email" name="email" size="30" value="" />
</div>

<div id="comments-open-footer">
<input type="submit" accesskey="s" name="post" id="comment-submit" value="Submit" />

</div>
</form>
</div>
</div>



<p id="gentime">This page was last generated on $Date: 2011/12/16 02:58:42 $</p> 

      </div><!-- End of "main" DIV. -->

<address>

This blog is written by W3C staff and working group participants,<br />
&nbsp;and maintained by <a href="/People/CMercier/">Coralie Mercier</a>.<br />
Authorized parties may <a href="/QA/new">log in</a> to create a new entry.<br/>
<span id="poweredby">Powered by Movable Type, magpierss and a lot of Web Technology</span>
    </address>


    
    <p class="copyright">
      <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; 1994-2011
      <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a>&reg;
      (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
      <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
      <a href="http://www.keio.ac.jp/">Keio</a>),
      All Rights Reserved.
      W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
      <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
      <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
      and <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a>
      rules apply. Your interactions with this site are in accordance
      with our <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">public</a> and
      <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">Member</a> privacy
      statements.
    </p>

  </body>
</html>