HTML and CSS Reference
In-Depth Information
.class (Class Selector)
The class selector matches elements with the specified class name. For
elements whose class attribute contains multiple space-separated
words, the class selector will select an element if any of those words
match the specified class name.
.help {} /* matches all elements with a class of help */
img.thumbnail {} /* matches image elements with class of
thumbnail */
Attribute Selectors
In addition to id and class attributes, any attribute can be used for
selection with via attribute selectors.
[att]
Selects elements with the attribute att , regardless of the attribute's
value.
input[required] {} /* matches html5 input elements with the
required attribute */
[att=val]
Selects elements with the attribute att with the value equal to val .
a[rel=tag] {} /* matches anchors with the rel attribute equal
to tag */
 
 
 
 
 
 
Search WWH ::




Custom Search