Attribute | Description |
---|---|
disabled | Specifies that an input field should be disabled |
max | Specifies the maximum value for an input field |
maxlength | Specifies the maximum number of character for an input field |
min | Specifies the minimum value for an input field |
pattern | Specifies a regular expression to check the input value against |
readonly | Specifies that an input field is read only (cannot be changed) |
required | Specifies that an input field is required (must be filled out) |
size | Specifies the width (in characters) of an input field |
step | Specifies the legal number intervals for an input field |
value | Specifies the default value for an input field |
Example
<input type="number" name="points" min="0" max="100" step="10" value="30">
<input type="date" name="bday">
<input type="date" name="bday">
<input type="date" name="bday" max="1979-12-31">
<input type="range" name="points" min="0" max="10">
<input type="month" name="bdaymonth">
<input type="week" name="week_year">
<input type="time" name="usr_time">
<input type="datetime" name="bdaytime">
<input type="datetime-local" name="bdaytime">
<input type="email" name="email">
<input type="search" name="googlesearch">
<input type="tel" name="usrtel">
<input type="url" name="homepage">