Prefix property

Matches the specified prefix of a property value.

[attr^=val] { sRules }

attr

Must be either an identifier or a string.

val

Must be either an identifier or a string.

sRules

String that specifies one or more cascading style sheet property/value pairs.

Property selectors are enabled only in standards-compliant mode (strict !DOCTYPE).

Attributes are case-sensitive.

The following style rule selects any property whose value begins with "B":

<style>
    .test       {display: none;}
    [attr^="B"] {display: block;}
</style>

<div class="test" attr="Blue">
    Test for [^=] (Prefix) succeeded.
</div>

Community Additions

ADD
Show: