Customize Text Selection in Webflow

Use the code below to change the selection highlight color and font color on your website.

Copy Code

<style> ::selection { /* For most browsers */ color: #000000; background: #00FFFF; } ::-moz-selection { /* For Firefox */ color: #000000; background: #00FFFF; } </style>

<style>
::selection { /* For most browsers */
  color: #000000;
  background: #00FFFF;
}

::-moz-selection { /* For Firefox */	
  color: #000000;
  background: #00FFFF;
}
</style>

If you're using Webflow, just copy and paste it in the head tag of your Webflow project in the page settings, change the hex code values to whatever works best for you, and save it.

Publish and open the live site to see the result.

Try your best to choose colors that contrast well so that your highlighted text is legible even for those who are color blind.

The safest bet is to choose black or white for the font color, and then make the highlight color something fun.

A portrait of Dalton Craighead, a Web Designer and Web Developer.
Dalton Craighead
Web Design & Development
Get in touch