Preventing Text Selection

An easy way to prevent (most) users from selecting your page text

If you’re looking for a simple way to prevent users from selecting (and presumably copying) some or all of your page text, look no further than the user-select CSS property:

user-select: auto|none|text|all;
auto
Sets text selection automatically based on the browser settings (this is the default).
none
Prevents the user from selecting text. This is the value to use if you want to disable text selection on an element.
text
Allows the user to select text.
all
Allows the user to select only the entire text block. Bonus: the text block can be selected just by clicking it.

Check out an example: