CSS4 solution:
Code:
.selectable{
-webkit-touch-callout: all; /* iOS Safari */
-webkit-user-select: all; /* Safari */
-khtml-user-select: all; /* Konqueror HTML */
-moz-user-select: all; /* Firefox */
-ms-user-select: all; /* Internet Explorer/Edge */
user-select: all; /* Chrome and Opera */
}
user-select is a CSS Module Level 4 specification, that is currently a draft and non-standard CSS property, but browsers support it well ? see
#search=user-select.
Read more on user-select
here on MDN and play with it
here in w3scools
Source