- Description
Matches attributes of html elements.
E[attr] matches any element E with an attribute 'attr'Common HTML4 attributes include: alt, id, class, title, style, height, width, align, valign, accesskey, tabindex.
In HTML5 the list of attributes has grown to include: contenteditable, contextmenu, draggable, hidden, item, itemprop, spellcheck, as well as custom defined attributes prefixed with data-.See also:
- Live Example
- Play with the code in the textarea below.
- Introduced in CSS version
- 2.1
- Inherited
- N/A
- Browser Support
Browsers IE Firefox Safari Opera Chrome Versions 7 1 1 6 0.2
Belongs to:
See the full list CSS properties and browser support: CSS Properties