HTML and CSS Reference
This selector will match any elements whose lang attribute value begins with “en”,
such as “en-US”. Note that language codes such as these are case insensitive.
<p lang="en-US">American English</p>
Delimited value selector
The [attribute~=value] selector will apply to elements whose attribute value contains
the given word among a space-separated list of words.
This rule will select both of the following elements. The word needs to be an exact
case-sensitive match; for example, the selector will not target “Word” or “words”.
<input type="text" value="word">
<input type="text" value="word word2">
Value substring selector
The [attribute*=value] selector matches elements whose attribute value contains the
Paragraph elements with a title containing “para” will be matched by this rule.
<p title="my paragraph"></p>
Value start selector
The [attribute^=value] selector matches every element whose attribute value begins
with the specified string.
Paragraphs with a title value starting with “first” will have this rule applied.
<p title="first paragraph"></p>