If you find this helpful, please click the Google Button to the left, if it is white, to make it turn blue or red. Thank you! (It also helps find this page again more easily.) |
CSS Style Selectors
Class Selector
span.class-name, ... { property: value; ... }
<span class="class-name">phrasing content<span>
id
Selector
span#id-value, ... { property: value; ... }
<span id="id-value">phrasing content<span>
Pseudo-class Selector
span:pseudo-class-name, ... { property: value; ... }
Context Selector
context-selector selector, ... { property: value; ... } div.context-class-name span.class-name, ... { ... }
<div class="context-class-name"> <span class="class-name">phrasing content<span> </div>