November 2011
Intermediate to advanced
384 pages
13h 23m
English
You can apply CSS declarations to HTML elements that specifically use a particular attribute within the element’s HTML tag. This type of selector enables you to narrow down selection criteria and apply only CSS declarations to specific HTML code that references said element and attribute:
element[attr] { ... }
Note that this particular selector ignores the attribute’s value, concentrating only on whether the attribute is defined in the original HTML page. The CSS declarations defined by this selector will be applied to every matching element and attribute in the HTML document — in other words, any reference to <element attr='value'>.
Do not forget, you can always combine the attribute selection component ...
Read now
Unlock full access