Size
You can use the size
attribute to set the display (in character widths) for the text input box. For example, the “birth year” input allow only four characters. If the size attribute is set to 4 as well, the textbox visually changes to allow only 4 characters.
HTML
<p>
Birth Year:
<input type="text" name="name" id="test-date" maxlength="4" size="4" />
</p>
Please Enter:
Birth Year:
Net ID:
Password:
Comments or Concerns:
- Previous
- Next