title: Multiple class attributes in HTML
body: <p>What happens when an element has multiple <code>class</code> attributes?</p>
  
  <pre><code>&lt;div id="test" class="one two three" class="four"&gt;
  </code></pre>
  
  <p>I'm trying to add a class to the output of <code>post_class();</code> in a WordPress plugin, but the function itself is creating the entire part <code>class="one two three"</code></p>
  
  <p>Is it equivalent to <code>class="one two three four"</code>?
  Or does the first or second win?
  Or is it undefined behaviour, in which case what do the major browsers do?</p>
  
  <p>If you know the correct way of adding a class to this snippet (WordPress plugin), then that would also be appreciated!</p>
  
  <pre><code>&lt;div id="post-&lt;?php the_ID(); ?&gt;" &lt;?php post_class(); ?&gt;&gt;
  </code></pre>