CSS user-select property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerFully supports
EdgeFully supports
OperaFully supports
Description
CSS user-select property tells a user which elements can be selected or how to select. This property can disable selection of the whole text or specific portions of the text.
Syntax
user-select : auto | text | none | all
Property values
autoDefault
-
If auto is the value of user-select for the current element, it is computed to any of the above given values such as none, all, text.
- Try it
user-select: auto; text
-
text value does not apply any restriction to the selection of text. And a user can select the text freely.
- Try it
user-select: text; none
-
none value does not allow a user to select the text i.e. it disables the selection of text.
- Try it
user-select: none; all
-
If a user selects a part of content of the current element, this selection must include all of the remaining content including the descendant elements (atomically).
- Try it
user-select: all;
Applicable to
It applies to all elements