How to make text unselectable using CSS?

You can not select this text! The user selection is disabled for this element.

To make a text unselectable in CSS, we use the user-select property. If you want a text not to be selected by the user, simply apply user-select: none; property on that particular element. It will prevent all kinds of selection events on the element.

Here is a working example:


    user-select: none; 
    -webkit-user-select: none; /* Safari */        
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */