Example | Classification | Explanation |
---|---|---|
a[href*="login"] | Attribute Contains Selector | Selects an element if the given attribute value contains at least once instance of the value stated |
a[href^="https://"] | Attribute Begins With Selector | Selects an element if the given attribute value begins with the value stated |
a[href$=".pdf"] | Attribute Ends With Selector | Selects an element if the given attribute value ends with the value stated |
a[rel~="tag"] | Attribute Spaced Selector | Selects an element if the given attribute value is whitespace-separated with one word being exactly as stated |
a[lang|="en"] | Attribute Hyphenated Selector | Selects an element if the given attribute value is hyphen-separated and begins with the word stated |
Last active
June 14, 2017 14:33
-
-
Save shanecarmody/53a62e12769cadc7e93a647418b011e6 to your computer and use it in GitHub Desktop.
CSS attribute selectors with special symbols/characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment