Css User Select Property

Css User Select Property
Css has the property called User Select whether the text the selectable or not. If the user will select double click on the text it will select and highlighted. Using this property you can prevent this.

User Select property has the four different values.

auto, none, text, all

auto: Auto is default value what default function available in the browser

none: None prevents the text selection.

Text: Text can be selected by the user. If the double click on the text it will select and drag the mouse over the text will be highlighted.

all: All is used to select the entire text by click on it. If you click on the text entire text will be selected.


Syntax:
p{
user-select: auto | none | text | all;
}


Example: Auto
This Auto property what you set default property that will taken
Css:
.selectxtat{
user-select: auto;
}
Html:
<div class="selectxtat">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</div>

Output:
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s


Example: None
This you will not allow to select the text check with the output
Css:
.selectxtat{
user-select: none;
}
Html:
<div class="selectxtat">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</div>

Output:
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s



Example: All
This you can click the text to select the entire text check with the output
Css:
.selectxtat{
user-select: all;
}
Html:
<div class="selectxtat">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</div>

Output:
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s



Example: Text
Double Click on the text to select that particular text only [Word] check with the output
Css:
.selectxtat{
user-select: text;
}
Html:
<div class="selectxtat">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</div>

Output:
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
Copyright Labw3