- 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.