The <input> tag with a type="email"
attribute creates a text field for email addresses.
The input will be validated when the form is submitted.
An <input> element of type email.
This email field accepts only a valid @gmail addres which is validated by a pattern.
<form action="/tutorial/action.html">
<fieldset>
<legend>Your Email</legend>
<input type="email" name="email"
placeholder="Enter a gmail address"
pattern=".+@gmail.com"><br /><br />
<input type="submit" value="Submit">
</fieldset>
</form>
The <input type="email">
specifies an email input field.
When submitted, validation ensures that the input data is a valid email address.
The optional multiple attribute allows multiple, comma-separated, email addresses.
<input type="email">
Here is when type="email"
support started for each browser:
Chrome
|
5.0 | May 2010 |
Firefox
|
4.0 | Mar 2011 |
IE/Edge
|
10.0 | Sep 2012 |
Opera
|
10.1 | Jun 2009 |
Safari
|
5.0 | Jun 2010 |
Back to <input>