CSS: Selecting text made easy

You can apply the user-select CSS property to an element to control how it handles selecting text for copy and paste. This allows you to limit selecting text, or make it automatic. If you use the all property, anytime a user clicks on that element the text is automatically selected. This can be useful for keys or codes where the user is expected to copy and paste the text.

.click_select { user-select: all; }

Example:

Click me!



Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 216.73.216.192
To prevent spam please submit by clicking the kitten: