CSS user-select

The user-select property in CSS allows you to control whether or not the user can select text on a webpage.

There are three possible values for the user-select property:

Let's see some examples:

Result:

            

Selectable text

Unselectable text

Text that can be selected but not interacted with

In the example above, you can see how the user-select property works. The first paragraph has the value auto, so the text is selectable. The second paragraph has the value none, so the text is unselectable. The third paragraph has the value text, so the text can be selected but not interacted with.