November 2011
Intermediate to advanced
384 pages
13h 23m
English
You can use different attribute value operators to identify HTML tags with specific attribute values. You can use this in your CSS selector logic to match on attribute values that are complete words and stylize them accordingly:
element[attr='value'] { ... }element[attr~='value'] { ... }element[attr|='value'] { ... }
The = operator matches elements whose attribute value exactly matches value. For example, img[src='image. jpg'] will match only images of image.jpg. Note that other attribute values found in the selected HTML tag, such as alt='An image', will be ignored by the CSS selector.
The ~= operator matches elements whose attribute value contains a complete word that matches value. ...
Read now
Unlock full access