Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 9
    A better approach is to use a <label> for the label and not the value. You can use JS and CSS to make it look the same, while not being so anti-semantic. dorward.me.uk/tmp/label-work/example.html has an example using jQuery. Commented Nov 1, 2010 at 8:34
  • 1
    This question has options for when .select() is not working on mobile platforms: stackoverflow.com/questions/3272089/… Commented Dec 2, 2013 at 4:47
  • 15
    Or even use a placeholder if you're working in a modern, HTML5 project. Commented Oct 26, 2014 at 11:17
  • 3
    placeholder="Please enter the user ID" Commented Aug 15, 2019 at 19:14
  • 8
    Easy with CSS: input { user-select: all; } Commented Feb 5, 2023 at 6:50