Text field
The <input> element with type="text" allows to input text for submission. Some other types like type="password" can be considered as specification.
|
City
|
attributes
attribute | description |
---|---|
id, name | Name of element. |
value |
Value for submission. |
pattern | A regular expression. The input's contents must match in order to be valid. |
placeholder | Value for example. Will be displayed when the text box is empty. |
size | Defines the width of control in characters. |
minlength | Defines the minimum number of characters the input should accept. |
maxlength | Defines the maximum number of characters the input should accept. |
spellcheck | A true value enable a spell checking. |
specifications
type | description |
---|---|
password | Allows to securely enter a password. Usually characters are replaced by the asterisk ("*") or a dot ("•"). |
Allows enter email address. If the multiple attribute is true, user can input the comma-separated list of email addresses. The input value is automatically validated before submission. On browsers that don't support this feature, a email input falls back to being a standard text input. | |
url | Allows enter url. The input value is automatically validated before submission. |
tel | Indicates that the user will enter a phone number. So the mobile devices can show a special keyboard. For validation you can use the patternattribute like pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}. |
search | Same as text, but can have other looking depending from browser. |