Attribute |
Values |
Description |
accept |
content types |
Specifies a filter for what file types the user can pick from the file input dialog box |
alt |
text |
Specifies an alternate text for images |
autocomplete |
on
off |
Specifies whether an <input> element should have autocomplete enabled |
autofocus |
autofocus |
Defines that <input> element should automatically get focus when the page loads |
checked |
checked |
Defines that type = "radio" or type = "checkbox" it will already be selected when the page loads. |
disabled |
disabled |
Disables the input control |
form |
form_id |
Defines one or more forms the <input> element belongs to |
formaction |
URL |
Defines the URL of the file that will process the input control when the form is submitted |
formaction |
URL |
Defines the URL of the file that will process the input control when the form is submitted |
formenctype |
application/x-www-form-urlencoded
multipart/form-data
text/plain |
Defines how the form-data should be encoded when submitting it to the server |
formmethod |
get
post |
Defines the HTTP method for sending data to the action URL |
formnovalidate |
formnovalidate |
Defines that form elements should not be validated when submitted |
height |
pixels |
Defines the height of an <input> element |
list |
datalist_id |
Specifies the <datalist> element that contains pre-defined options for an <input> element |
max OR min |
autofocus |
Specifies the maximum OR minimum value |
maxlength |
number |
Defines the maximum number of characters allowed in a text field |
multiple |
multiple |
Specifies that a user can enter multiple values |
name
value |
text |
Defines the name & value of an <input> element |
pattern |
regexp |
Specifies a regular expression that an <input> element's value is checked against |
placeholder |
text |
Specifies a short hint that describes the expected value |
readonly |
readonly |
Specifies that an input field is read-only |
required |
required |
Specifies that an input field must be filled out before submitting the form |
size |
number |
Specifies the width, in characters, of an <input> element |
src |
URL |
Defines the URL of the image to display (only for type="image") |
step |
number |
Specifies the legal number intervals for an input field |
type |
button
checboxcolor
date
datetime
datetime-local
email
file
hidden
image
month
number
password
radio
range
reset
search
submit
tel
text
time
URL
week |
Specifies the type <input> element to display |
width |
pixels |
Specifies the width of an <input> element |