[html5] r2944 - [a] (0) Clarify when start tags can be omitted, in the face of empty elements. ( [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Mar 31 17:19:33 PDT 2009


Author: ianh
Date: 2009-03-31 17:19:33 -0700 (Tue, 31 Mar 2009)
New Revision: 2944

Modified:
   index
   source
Log:
[a] (0) Clarify when start tags can be omitted, in the face of empty elements. (credit: sp) (bug 6630)

Modified: index
===================================================================
--- index	2009-04-01 00:12:26 UTC (rev 2943)
+++ index	2009-04-01 00:19:33 UTC (rev 2944)
@@ -50999,8 +50999,9 @@
   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>
+  <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
@@ -51009,8 +51010,8 @@
 
   <!-- <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
@@ -51099,7 +51100,8 @@
   <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>
+  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
@@ -51113,12 +51115,14 @@
   element.</p>
 
   <!-- <tbody> -->
+
   <p>A <code><a href=#the-tbody-element>tbody</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-tbody-element>tbody</a></code> element is a
   <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>
+  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

Modified: source
===================================================================
--- source	2009-04-01 00:12:26 UTC (rev 2943)
+++ source	2009-04-01 00:19:33 UTC (rev 2944)
@@ -62742,8 +62742,9 @@
 
   <!-- <head> -->
   <p>A <code>head</code> element's <span
-  title="syntax-start-tag">start tag</span> may be omitted if the
-  first thing inside the <code>head</code> element is an element.</p>
+  title="syntax-start-tag">start tag</span> may be omitted <!--if the
+  element is empty, or--> if the first thing inside the
+  <code>head</code> element is an element.</p>
 
   <!-- </head> -->
   <p>A <code>head</code> element's <span title="syntax-end-tag">end
@@ -62754,8 +62755,8 @@
   <!-- <body> -->
   <p>A <code>body</code> element's <span
   title="syntax-start-tag">start tag</span> may be omitted if the
-  first thing inside the <code>body</code> element is not a
-  <span>space character</span> or a <span
+  element is empty, or if the first thing inside the <code>body</code>
+  element is not a <span>space character</span> or a <span
   title="syntax-comments">comment</span>, except if the first thing
   inside the <code>body</code> element is a <code>script</code> or
   <code>style</code> element. <!-- Note that even if the </head> end
@@ -62849,7 +62850,8 @@
   first thing inside the <code>colgroup</code> element is a
   <code>col</code> element, and if the element is not immediately
   preceded by another <code>colgroup</code> element whose <span
-  title="syntax-end-tag">end tag</span> has been omitted.</p>
+  title="syntax-end-tag">end tag</span> has been omitted. (It can't be
+  omitted if the element is empty.)</p>
 
   <!-- </colgroup> -->
   <p>A <code>colgroup</code> element's <span
@@ -62865,13 +62867,15 @@
   element.</p>
 
   <!-- <tbody> -->
+
   <p>A <code>tbody</code> element's <span
   title="syntax-start-tag">start tag</span> may be omitted if the
   first thing inside the <code>tbody</code> element is a
   <code>tr</code> element, and if the element is not immediately
   preceded by a <code>tbody</code>, <code>thead</code>, or
   <code>tfoot</code> element whose <span title="syntax-end-tag">end
-  tag</span> has been omitted.</p>
+  tag</span> has been omitted. (It can't be omitted if the element is
+  empty.)</p>
 
   <!-- </tbody> -->
   <p>A <code>tbody</code> element's <span title="syntax-end-tag">end




More information about the Commit-Watchers mailing list