Search within TutorialsPark

CSS Hyphenated List Attribute Selector E[attr|="value"]


Selects any element with a lang attribute whose value is hypen-seperated list of values.


Definition and Notes.

1. Use this Selector to apply CSS styles to elements where the attribute's value is exactly the same or value immediately followed by a hyphen

2. This selector is generally used for matching languages codes. Eg: a[hreflang|= "en"].

3. 3. Eg: a[hreflang|= "en"] will select elements all elements with hreflang equal to "en" or "en-US" or "en-GB".


Pattern:

CSS Hyphenated List Attribute selector. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note: For the element to be selected the target value must be at the beginning of the string.

Related Examples.