Change Text Highlight Color

This tutorial explains how to change the way your browser displays highlighted text. By following the steps in this tutorial, users will be able to add an extra layer of interactivity to their website by customizing the appearance of the highlighted text when a user highlights it with their mouse.

How to add Text Highlight feature in Webflow?

Step #1

Copy the Text Highlight <script>

Integrating our Text Highlighting tool into your website is a breeze! Follow these easy steps to get started:

  1. Click on "Pages" in the left navigation or press "P" on your keyboard
  2. Select the settings icon beside the page you want to add the script to
  3. Scroll down to the "Before </body> tag" section
  4. Simply copy the script we've provided and paste it here

That's it!

Adding script within Page Settings on WebFlow
Adding script within Page Settings on WebFlow

Step #2

Set Custom Attribute

Name field will change for each - email, phone number and name. Value field will be left empty for all of them.

To ensure the smooth functioning of our Text Highlighting tool, you will need to add attribute name to the following element on your page

  1. Attribute name : neue-highlight is added to the element whose background color and text color will serve as the background and text color for your highlighted text.

The Value attribute field should be left empty. You can hide this element from the page. Do not delete it.

Step #3

Publish your site

It's highly recommended to publish your site on staging environment to ensure the scrip. Once you have confirmed it, you can publish it to your primary domain.

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.