Creates a text entry control for email addresses. | HTML 5 |
HTML Syntax
<input type = email
list = datalist_id
maxlength = number
minlength = number
multiple
name = control_name
pattern = reg_ex
size = number
>
NOTE: Only the <input
> start tag must be present. The element has no end tag.
The <input type=email
> element is a text input field designed for a user to enter and edit an email address, or, if the multiple attribute is specified, a list of email addresses.
The control is functionally identical to text inputs, but the appearance may vary depending on the browser and operating system.
Browsers implement the <input type=email
> element as a standard text input field with basic validation features.
The input value is automatically validated to ensure that it is either an empty string or a properly-formatted email address ( or list of addresses ) before the form can be submitted.
The :valid and :invalid CSS pseudo-classes may be applied as appropriate to visually denote whether the current value of the field is a valid email address or not.
<input type=email
> may be specified with size, to indicate how wide in characters the input field should be, and with minLength and maxLength to restrict the number of characters that the user can enter into the email field.
The <input_email>
element supports the following attributes, in addition to global attributes and attributes common to all HTML input elements.
The following example shows how a simple <input type=email
> control renders on a web page.
<input type=email>
INPUT INPUT type=search INPUT type=url TEXTAREA