I\'m using the following HTML code to autoselect some text in a form field when a user clicks on the field:
This question was posted five years ago, but with HTML5, you can make this feature with the placeholder attribute.