Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to interpret HTML multiple class names in the CSS renderization? What W3C says about it?
    primarykey
    data
    text
    <p>About HTML <em>class</em> attribute assigned with two or more class names, that is, </p> <pre><code>&lt;tag class="a b"&gt;....&lt;/tag&gt; </code></pre> <p>I can test it with different browsers -- see tests at <a href="http://jsfiddle.net/PP9yf/1/" rel="nofollow noreferrer">http://jsfiddle.net/PP9yf/1/</a> or <a href="https://stackoverflow.com/a/3066365/287948">this question/answer</a> -- and deduce a common sense rule: </p> <blockquote> <p><em>use <code>class="a"</code> if it is defined, or use <code>class="b"</code> if it is defined, or use BOTH if both defined</em>... And, when using both, if they assign same property, <em>the last CSS definition overrides the others</em>.</p> </blockquote> <p>So, we can interpret for example that <code>class="a b"</code> must be the same as <code>class="b a"</code>.</p> <p><strong>But it is a W3C official interpretation?</strong></p> <p>Where the W3C standard that say this rule?</p> <hr> <p>PS: I started with <a href="https://stackoverflow.com/q/13808846/287948">this other question</a>, but my motivation is software development. I need this normative answer to develop a software similar to <a href="http://www.pelagodesign.com/sidecar/emogrifier/" rel="nofollow noreferrer">emogrifier</a>, etc.</p> <p>Example: <a href="https://github.com/tijsverkoyen/CssToInlineStyles" rel="nofollow noreferrer">CssToInlineStyles</a> need this correction... But only need a "correction" IF there are a W3C standand saying that the software is wrong.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload