CSS [attribute^=value] Selector

❮ Previous Selectors Next ❯


p[title^="Hello"] {
  background: red;


The [attribute^=value] selector selects all elements of that have the attribute that begins with the given value.

The above example selects all elements with a title attribute value that starts with "Hello":

Version: CSS3

Standard Syntax

[attribute^=value] {
  css declarations;

Browser Support

The numbers in the table specify the first browser version that fully supports the property.


❮ Previous Selectors Next ❯