Value
The value
attribute “pre-fills” a text box. Unlike placeholder
, when the user clicks in the text box, the “pre-filled” text is not replaced. Instead, the user can freely edit, remove, or keep it.
HTML
<p>
Birth Year:
<input type="text" name="name" id="test-date" maxlength="4" size="4" value="19" />
</p>
Please Enter:
Birth Year:
Net ID:
Password:
Comments or Concerns:
NOTE: This attribute can be used to fill “input” elements with data used “most of the time”.
- Previous
- Next