Toggle navigation
Home
Learn
Discuss
GO
Signup
Login
Upvotes
Anonymous 0
User 0
Member votes
Anonymous votes
How to create a single-line text input in HTML
By jasonj
Feb 7, 2016 17:38
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?
Previous:
How to create a button in HTML
Next:
How to create a single-line password input in HTML
This content is part of a
series
1.
Introduction to HTML
2.
The head and body HTML Tags
3.
Open an HTML File in a Browser
4.
Get a Text Editor for HTML Editing
5.
Create an HTML File in a Text Editor
6.
HTML Attributes
7.
How to add a line break in HTML
8.
How to create a link in HTML
9.
How to create an image in HTML
10.
How to create a button in HTML
11.
How to create a single-line text input in HTML
12.
How to create a single-line password input in HTML
13.
Common HTML Elements (page 1 of 2)
14.
Common HTML Elements (page 2 of 2)
Was this helpful?
vote up
Thanks! Your feedback is appreciated.
Tags
Comments
Leave a Comment
Submit
I agree to the
Terms of Service
Success!
We'll review your submission and post it to this page.
Share your discussion on Twitter!
Tweet
Most Popular
How to Install Spacemacs on Windows
How to comment/uncomment code in Spacemacs
Spacemacs Tutorials
Spacemacs (Vim mode) Cheatsheet
How to Install py2exe on Windows 7
How to Create an Executable from Python 3 Code using py2exe
What is PyWin32?
Stay Connected
Submit
Be the first to find out about new articles, promotions, and exclusive lessons.
Success! We're cooking up an email for you right now.
Topics
CherryPy
Chromium Embedded Framework
CSS
Git
HTML
JavaScript
jQuery
Python
Spacemacs
VueJS
Questions? Want to get in touch?
Recent Posts
How to debug Python code using PDB++
VueJS
How to resolve "Undeclared variable or function 'module'" error thrown by js2-mode in Spacemacs
Spacemacs (Vim mode) Cheatsheet
Spacemacs Tutorials
How to install Exuberant Ctags on Ubuntu 14
How to edit your Projectile projects list in Spacemacs on Windows
Thank you.
remove vote
Your vote has been removed.
Advertise with Us
Contact
Terms of Use
Design © 2015, Downranked, LLC.,
Original user code contributions under MIT License
Comments
Leave a Comment
We'll review your submission and post it to this page.