Name
<input type=text> — NN: 2, 3, 4 • MSIE: 2, 3, 4, 5 • HTML 4 • WebTV • Opera3
Synopsis
<input type=text>
Within a <form>
, creates a text input
element. This is the default input type; using the
<input>
tag without a type attribute creates
a text input element.
Attributes
maxlength=
number
Specifies the maximum number of characters the user can input for this element.
name=
text
Specifies the name of this parameter to be passed to the form-processing application for this element (required).
size=
number
Specifies the size of the text-entry box (measured in number of characters) to be displayed for this element. Users can type entries that are longer than the space provided, causing the field to scroll to the right.
value=
text
Specifies the value that will initially be displayed in the text box.
Get HTML Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.