HTML <input> type="email"

The <input> tag with a type="email" attribute creates a text field for email addresses.

Example

#

An <input> element of type email.
This email field accepts only a valid @gmail addres which is validated by a pattern.

Your Email

<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>

Using input type="email"

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.


Syntax

<input type="email">

Browser support

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

You may also like

 Back to <input>
Guides