copy link with text highlighted in a website

2 min read  •  18 Feb 2023

Ever wondered, when you search for some query on google, you get a nice minimal answer from a long blog post or article, and when you open that article that particular text or group of text gets highlighted. In case you haven't seen that here's a demo-


How does it work?

For the above demo, the link is -,and%203.7%25%20for%20women).

If we look closely, the link has #:~:text= at the end of the website path. So the structure of url to form such a link is-

# structure of url text you want to highlight

And here is a demo url, where you can verify the above -

  1. Go to the website and select the text which you want to highlight.
  2. Right-click on the text
  3. Select Copy link to highlight

Highlighting multiple texts

To get the link with multiple texts highlighted, manual effort is needed i.e. structuring the url by ourselves in the following format- is text 1&text=this is text 2

Demo Url - there, I am Akul&text=I also like to explore opensource projects