In this chapter we are listing only HTML5 input element and new types, as well as form specific HTML5 attributes.
Check references for other HTML5 attributes:
- HTML5 attributes
- HTML5 global attributes
- HTML5 event attributes
- HTML5 attributes for non-HTML5 elements
TYPE | DESCRIPTION |
---|---|
color | allows user to choose color (trhough a color picker) |
date | allows to input a date (usually as a date picker) |
datetime | allows to input a date and time with the time zone |
datetime-local | allows to input a date and time with the time zone but in a local format |
allows only standard email format (with @) | |
month | allows to input a week and a year (may be also presented as a date picker) |
number | permits users to input only numbers into the field |
range | defines permitted range of a number (usually as a slider) |
search | should be used to replace a externally scripted search model (depends on browsers support) |
tel | allows only standard telephone numbers format |
time | allows inputting a time (usually as a date picker) |
url | allows only standard URL format (http://...) |
week | allows inputting a week and a year (may be also presented as a date picker) |
ATTRIBUTE | DESCRIPTION | ELEMENT(S) |
---|---|---|
autofocus | specifies which form element receives the focus as the page loads | <button>, <input />, <select>, <textarea> |
autocomplete | allows an auto complete options for the element | <form>, <input/> |
form | explains to which form the specified attribute is associated with | <button>, <fieldset>, <input />, <keygen>, <label>, <object> (non-form element), <output>, <select>, <textarea> |
formaction | used to allow an input (or a button) submit button to re-direct action to another location (by URL) | <button>, <input /> |
formenctype | used to allow an input (or a button) submit button to replace form set encoding with their own type | <button>, <input /> |
formmethod | used to allow an input (or a button) submit button to replace form set method with their own | <button>, <input /> |
formnovalidate | if set to "true", it ignores native HTML5 validations of form's input fields | <button>, <input /> |
formtarget | defines which frame or window the form will be executed at (same as target attribute) | <button>, <input /> |
height | defines the height of an element | <embed>, <iframe>, <img />, <input />, <object>, <video> |
list | refers to the id of a <datalist> suggesting a list of values that may be used as that particular input field | <input /> |
max | affects only numeric types (number, date...), and specifies a possible maximum value to be input | <input /> |
min | affects only numeric types (number, date...), and specifies a possible minimum value to be input | <input /> |
multiple | allows a form element to choose (select) more then one value at the time | <input />, <select> |
novalidate | if set to "true", it ignores native HTML5 validations of form's fields that belong to that form element | <form> |
pattern | validates the value of an input field against given regular expression statement | <input /> |
placeholder | for textual fields, it is used to visualized a default value that will disappear when an user enters a new one | <input />, <textarea> |
required | requires a form field to have a value prior to submission | <input />, <select>, <textarea> |
step | affects only numeric types (number, date...), and specifies an increase / decrease step after user's input (usually showed as up / down arrows next to a field) | <input /> |
width | defines the width of an element | <embed>, <iframe>, <img />, <input />, <object>, <video> |
Comments
No comments have been made yet.
Please login to leave a comment. Login now