h2[align="left"]
{ cursor: hand }
[Matches all occurrences of the element named 'h2' using an 'align'
attribute set to 'left'.]
"Begins-with" Attribute Value Selector
[CSS3] [N6]
Description:
Matches all elements with the specified attribute that BEGIN
with the specified value. This selector would match attribute values that
are equal to it as well as to longer values of which it is a substring.
h2[align^="left"]
{ cursor: hand }
[Matches all occurrences of the element named 'h2' using an 'align'
attribute where "left" is at the beginning of the value.]
"Ends-with" Attribute Value Selector
[CSS3] [N6]
Description:
Matches all elements with the specified attribute that END with the
specified value. This selector would match attribute values that are equal to it as
well as to longer values of which it is a substring.
h2[align*="left"]
{ cursor: hand }
[Matches all occurrences of the element named 'h2' using an 'align'
attribute where "left" is any part of the value.]
One-Of-Many Attribute Value Selector
[CSS2] [N6|O4]
Description:
This is a special form of the Attribute Value Selector, allowing a
portion of an attribute value to be exactly matched where the portions
of the attribute value are separated by spaces. This is especially
useful in HTML with the common CLASS attribute where multiple classes
can be assigned to a single element.
h3[class~="class2"]
{ font-weight: bold }
[would match <h3CLASS="class2"> and <h3CLASS="class1 class2">]
Hyphen Attribute Value Selector
[CSS2]
Description:
This is another special form of the Attribute Value Selector, allowing a
portion of an attribute value to be exactly matched, where the portions of
the attribute value are separated by hyphens. The search for the attribute
value fragment always starts from the beginning of the value. This Selector
type is especially useful with RFC 1766 language values used in the HTML
common LANG attribute and the xml:lang attribute.