Simple Attribute Selector
Pattern:
element1[attr]
Description:
Simple attribute selector selects any element based on the presence of an attribute, regardless of the attribute's value.
Examples:
a[rel] {border-bottom: 3px double gray;}
p[class] {border: 1px dotted silver;}
Home
HTML CSS Book
CSS Reference
HTML CSS Book
CSS Reference
Selector:
- Universal Selector
- Type Selector
- Descendant Selector
- Child Selector
- Adjacent Sibling Selector
- Class Selector
- ID Selector
- Simple Attribute Selector
- Exact Attribute Value Selector
- Partial Attribute Value Selector
- Hyphen-separated Attribute Value Selector
- !important
Related: