title: HTML5 Tag Omission: Spec Clarification With Regards To Language
body: <p>The HTML5 specification for tag omission (<a href="http://www.w3.org/TR/html51/syntax.html#syntax-tag-omission" rel="noreferrer">http://www.w3.org/TR/html51/syntax.html#syntax-tag-omission</a>) starts with the following two statements (emphasis mine):</p>
  
  <ul>
  <li>An html element's start tag may be omitted if <strong>the first thing inside</strong>
  the html element is not a comment. </li>
  <li>An html element's end tag may be omitted if the html element is not
  <strong>immediately followed by</strong> a comment.</li>
  </ul>
  
  <p>Those to statements read similarly, but not the same and I am wondering if someon can offer clarification on what they mean.</p>
  
  <p>The following case seems unambiguous - you can't remove the start or close tags:</p>
  
  <pre><code>&lt;html&gt;&lt;!-- start --&gt; ... &lt;/html&gt;&lt;!-- end --&gt;
  </code></pre>
  
  <p>But what about when whitespace is introduced into the mix. Can the start tag for <code>html</code> be eliminated in the following case?</p>
  
  <pre><code>&lt;html&gt;
     &lt;!-- comment after whitespace --&gt;
     ...
  </code></pre>
  
  <p>Can the end tag be eliminated in a similar scenario?</p>
  
  <pre><code>   ...
  &lt;/html&gt;
  &lt;!-- comment after whitespace --&gt;
  </code></pre>
  
  <p>Some of the other rules make specific mention of whitespace characters which leads me to believe that they should be taken into account. Most of the rules say "...immediately followed by..." which is different than the first bullet point listed.</p>