By default, the div element can be selected, but if you need to set it to cannot be selected, you can set it as follows: < /span>
div {
user-select: none;
}
If you wish toallow selection in certain circumstances, you can override this style where needed. For example:
div.allow-select {
user-select: auto;
}