Easy Tutorial
❮ Pr Padding Right Css3 Pr Border Image ❯

CSS3 [attribute$=value] Selector

Complete CSS Selector Reference

Example

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


Definition and Usage

The [*attribute* $=*value* ] selector matches elements with an attribute value ending in the specified value.


Browser Support

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

Note: The [*attribute* $=*value* ] selector works in IE8, but you must declare <!DOCTYPE>.


Try it Yourself - Examples

Example

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


Complete CSS Selector Reference

❮ Pr Padding Right Css3 Pr Border Image ❯