HTML SIZE ATTRIBUTE
Definition and usage
For input elements, the
size attribute specifies
The visible width, in
characters of an <input>
element
For select elements, the
Size attribute specifies
the number of visible
options in a drop-down
list.
The size attribute can be
used on the following
elements:
Elements Attribute
<input> Size
<select> size
Note: The size attribute
works with the following
input types: text, search,
tel, url, email and pass.
Tip: To specify the
maximum number of
characters allowed in the
<input> element, use the
maxlength attribute.
<input size=”number”>
Attribute Values
Values Description
Number Specifies the
width of an
<input> element, in
characters. Default value
is 20