title: When does whitespace matter in HTML?
body: <h1><a href="http://jsfiddle.net/g5FBv/" rel="noreferrer">example 1</a></h1>
  <pre><code>&lt;div&gt;&lt;button&gt;one&lt;/button&gt;&lt;button&gt;two&lt;/button&gt;&lt;/div&gt;
  
  &lt;div&gt;
      &lt;button&gt;one&lt;/button&gt;
      &lt;button&gt;two&lt;/button&gt;
  &lt;/div&gt;
  ​
  </code></pre>
  <p>In the first div there is no space between the two buttons, in the second, there is.</p>
  <p>Now let's consider another example:</p>
  <h1><a href="http://jsfiddle.net/g5FBv/1/" rel="noreferrer">example 2</a></h1>
  <pre><code>&lt;div&gt;a&lt;/div&gt;
  &lt;div&gt; b&lt;/div&gt;​​​​​​​​​​​​
  </code></pre>
  <p>There is no space before that <code>b</code>.</p>
  <h1>example 3</h1>
  <pre><code>a&lt;b&gt; bold&lt;/b&gt; man
  </code></pre>
  <p>Now the whitespace before <code>bold</code> <em>is</em> significant</p>
  <h1>example 4</h1>
  <pre><code>a &lt;b&gt; bold&lt;/b&gt; man
  </code></pre>
  <p>Now only one of the spaces (after the &quot;a&quot; or before &quot;bold&quot;) is significant.</p>
  <h1>question</h1>
  <p>What are the exact rules behind when whitespace is stripped or collapsed?</p>