freeCodeCamp/guide/english/css/selectors/attribute/dollar-sign-equals/index.md

325 B

title
Dollar Sign Equals

Dollar Sign Equals

Dollar sign CSS attribute selector or $ is used for selecting attributes that end with specific value.

Example

If you want to search all anchor links of file type .pdf and make them red, you can do it like this:

a[href$=".pdf"] {
   color: red;
}