Easy Tutorial
❮ Pr Text Text Transform Pr Background Repeat ❯

CSS [attribute~=value] Selector

Complete CSS Selector Reference

Example

Select all elements whose title attribute contains the word "flower"


Definition and Usage

The [attribute~=value] selector is used to select elements with an attribute value containing a specified word.


Browser Support

All major browsers support the [attribute~=value] selector.

Note: The [attribute~=value] selector works in IE8, but requires the <!DOCTYPE> to be declared.


Related Articles

CSS Tutorial: CSS Attribute Selectors


❮ Pr Text Text Transform Pr Background Repeat ❯