Ravi Kumar Profile picture
Web Developer | Technical Writer @lambdatesting | Sharing โ€ข Web Dev Tips โ€ข resources โ€ข AI โ€ข No-code tools โ€ข | DM for Collaboration

Jul 22, 2021, 9 tweets

CSS selector

๐Ÿงต๐Ÿงต๐Ÿ‘‡๐Ÿ‘‡

final part

attribute selector

this selector is used to select specific parts of an Html element or specific attribute.

01. [attr] Selector

Represents elements with an attribute-name of attr This type of attribute selector is used to select all the elements that have the specified attribute and applies the CSS property to that attribute.

02. [attr=value]

Represents elements with an attribute-name of attr.

This selector is used to select all the elements whose attribute has the value exactly the same as the specified value.

03. [attr~=value]

Represents elements with an attribute-name of attr whose value is a whitespace-separated list of words, one of which is the exact value.

04. [attr|=value]

Represents elements with an attribute-name of attr whose value can be exactly value or can begin with value immediately followed by a hyphen, - (U+002D). It is often used for language subcode matches.

05. [attr^=value]

Represents elements with an attribute-name of attr whose value is prefixed (preceded) by value.

06. [attr$=value]

Represents elements with an attribute-name of attr whose value is suffixed (followed) by value.

07. [attr*=value]

Represents elements with an attribute-name of attr whose value contains at least one occurrence of value within the string

thanks for reading the full thread ๐Ÿ˜€

if you found this thread useful share full thread with others.

like and hit follow button for more threads.

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling