Pattern:
element.CLASSNAME
Definition:
The element.CLASSNAME selector matches every element that have a class attribute containing CLASSNAME. The CLASSNAME must immediately follow the ".".
When representing the class attribute, element.CLASSNAME and element[class~=CLASSNAME] have the same meaning.
Examples:
Assign styles to all elements with class="code"
*.code { font-family: monospace; }
or simply
.code { font-family: monospace; }
Style all <p> elements with class="note"
p.note { color: yellow; }
Style every <p> element whose class attribute has been assigned a list of whitespace-separated CLASSNAMEs that includes both animal and sky
p.animal.sky { color: skyblue; }
Please login to continue.