Skip to content

CSS Selectors

Attribute value starts with

About

The [attr^=value] selector matches all elements with the specified attribute whose value starts with a certain value.

Matching attribute

The example matches all hyperlinks with the href attribute starting with https://. The third hyperlink uses a different value for the href attribute, so it is not matched.

  • Change the selector match mailto: links instead