Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Attribute selectors are used to apply style sheet declarations based on the presence of attributes or attribute values of an HTML element.
There are several types of attribute selectors, and CSS is capable of detecting attributes based on the following criteria:
The following sections examine each type of attribute selector in greater depth and provide examples of the syntax for each.
NOTE All major browsers except for IE 6 support attribute selectors.