CSS is case insensitive in all matters under its control; however, some things, such as the document markup language, are beyond its control. HTML is case insensitive in most respects, except when it comes to certain attribute values, like the id and class attributes. XHTML, being XML, is always case sensitive.
This means that the CSS element type selectors for an HTML document are case insensitive, though they’re case sensitive for XHTML, as this example shows:
The first rule will apply to all level-one headings in HTML (even if the tags are written as
<H1>...</H1> in HTML) and XHTML.
The second rule will apply to all level-one headings in HTML, even if the tags are written as
<h1>...</h1>. It won’t apply to any heading element in an XHTML document.