Easy Tutorial
❮ Sel Enable Sel Required ❯

CSS3 [attribute*=value] Selector

Complete CSS Selector Reference

Example

Set the background color for all div elements with a class attribute value containing "test":


Definition and Usage

The [attribute*=value] selector matches elements whose attribute value contains a specified value.


Browser Support

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

Note: The [attribute*=value] selector works in IE8, but it must be declared with <!DOCTYPE>.


More Examples

Example

Set the background color for all elements with a class attribute value containing "test":


Complete CSS Selector Reference

❮ Sel Enable Sel Required ❯