Your browser does not support JavaScript!
Upvotes Anonymous 0 User 0

How to create a single-line text input in HTML

The HTML
<label for="username">Username</label>
<input type="text" id="username" maxlength="15">
We've created a <label> so that the user knows what to type in the input box. The for attribute on the label corresponds to the ID on the <input> box.
What does it look like?
Was this helpful?

Tags

Comments

Leave a Comment

I agree to the Terms of Service
Design © 2015, Downranked, LLC.,
Original user code contributions under MIT License