spec/Overview.html 1.2109 2945 Clarify when start tags can be omitted,

Clarify when start tags can be omitted, in the face of empty elements.
(credit: sp) (bug 6630) (whatwg r2945)
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6630

8.1.2.4 Optional tags
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2109.html#optional-tags

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2108&r2=1.2109&f=h
http://html5.org/tools/web-apps-tracker?from=2944&to=2945

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2108
retrieving revision 1.2109
diff -u -d -r1.2108 -r1.2109
--- Overview.html 1 Apr 2009 00:12:32 -0000 1.2108
+++ Overview.html 1 Apr 2009 00:20:58 -0000 1.2109
@@ -45541,12 +45541,13 @@
   each other.<h5 id=optional-tags><span class=secno>8.1.2.4 </span>Optional tags</h5><p>Certain tags can be <dfn id=syntax-tag-omission title=syntax-tag-omission>omitted</dfn>.</p><!-- <html> --><p>An <code><a href=#the-html-element>html</a></code> element's <a href=#syntax-start-tag title=syntax-start-tag>start tag</a> may be omitted if the
   first thing inside the <code><a href=#the-html-element>html</a></code> element is not a <a href=#syntax-comments title=syntax-comments>comment</a>.</p><!-- </html> --><p>An <code><a href=#the-html-element>html</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end
   tag</a> may be omitted if the <code><a href=#the-html-element>html</a></code> element is not
-  immediately followed by a <a href=#syntax-comments title=syntax-comments>comment</a>.</p><!-- <head> --><p>A <code><a href=#the-head-element>head</a></code> element's <a href=#syntax-start-tag title=syntax-start-tag>start tag</a> may be omitted if the
-  first thing inside the <code><a href=#the-head-element>head</a></code> element is an element.</p><!-- </head> --><p>A <code><a href=#the-head-element>head</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end
+  immediately followed by a <a href=#syntax-comments title=syntax-comments>comment</a>.</p><!-- <head> --><p>A <code><a href=#the-head-element>head</a></code> element's <a href=#syntax-start-tag title=syntax-start-tag>start tag</a> may be omitted <!--if the
+  element is empty, or--> if the first thing inside the
+  <code><a href=#the-head-element>head</a></code> element is an element.</p><!-- </head> --><p>A <code><a href=#the-head-element>head</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end
   tag</a> may be omitted if the <code><a href=#the-head-element>head</a></code> element is not
   immediately followed by a <a href=#space-character>space character</a> or a <a href=#syntax-comments title=syntax-comments>comment</a>.</p><!-- <body> --><p>A <code><a href=#the-body-element>body</a></code> element's <a href=#syntax-start-tag title=syntax-start-tag>start tag</a> may be omitted if the
-  first thing inside the <code><a href=#the-body-element>body</a></code> element is not a
-  <a href=#space-character>space character</a> or a <a href=#syntax-comments title=syntax-comments>comment</a>, except if the first thing
+  element is empty, or if the first thing inside the <code><a href=#the-body-element>body</a></code>
+  element is not a <a href=#space-character>space character</a> or a <a href=#syntax-comments title=syntax-comments>comment</a>, except if the first thing
   inside the <code><a href=#the-body-element>body</a></code> element is a <code><a href=#script>script</a></code> or
   <code><a href=#the-style-element>style</a></code> element. <!-- Note that even if the </head> end
   tag is present, the parser makes <style> and <script> elements
@@ -45604,7 +45605,8 @@
   if there is no more content in the parent element.</p><!-- <colgroup> --><p>A <code><a href=#the-colgroup-element>colgroup</a></code> element's <a href=#syntax-start-tag title=syntax-start-tag>start tag</a> may be omitted if the
   first thing inside the <code><a href=#the-colgroup-element>colgroup</a></code> element is a
   <code><a href=#the-col-element>col</a></code> element, and if the element is not immediately
-  preceded by another <code><a href=#the-colgroup-element>colgroup</a></code> element whose <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> has been omitted.</p><!-- </colgroup> --><p>A <code><a href=#the-colgroup-element>colgroup</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> may be omitted if the
+  preceded by another <code><a href=#the-colgroup-element>colgroup</a></code> element whose <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> has been omitted. (It can't be
+  omitted if the element is empty.)</p><!-- </colgroup> --><p>A <code><a href=#the-colgroup-element>colgroup</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end tag</a> may be omitted if the
   <code><a href=#the-colgroup-element>colgroup</a></code> element is not immediately followed by a
   <a href=#space-character>space character</a> or a <a href=#syntax-comments title=syntax-comments>comment</a>.</p><!-- </thead> --><p>A <code><a href=#the-thead-element>thead</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end
   tag</a> may be omitted if the <code><a href=#the-thead-element>thead</a></code> element is
@@ -45614,7 +45616,8 @@
   <code><a href=#the-tr-element>tr</a></code> element, and if the element is not immediately
   preceded by a <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-thead-element>thead</a></code>, or
   <code><a href=#the-tfoot-element>tfoot</a></code> element whose <a href=#syntax-end-tag title=syntax-end-tag>end
-  tag</a> has been omitted.</p><!-- </tbody> --><p>A <code><a href=#the-tbody-element>tbody</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end
+  tag</a> has been omitted. (It can't be omitted if the element is
+  empty.)</p><!-- </tbody> --><p>A <code><a href=#the-tbody-element>tbody</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end
   tag</a> may be omitted if the <code><a href=#the-tbody-element>tbody</a></code> element is
   immediately followed by a <code><a href=#the-tbody-element>tbody</a></code> or <code><a href=#the-tfoot-element>tfoot</a></code>
   element, or if there is no more content in the parent element.</p><!-- </tfoot> --><p>A <code><a href=#the-tfoot-element>tfoot</a></code> element's <a href=#syntax-end-tag title=syntax-end-tag>end

Received on Thursday, 2 April 2009 04:24:50 UTC