Input Type: Email

One way to send email from a form has been covered here but that was using the "text" type of input. This is another input type which is used for input fields that should contain an e-mail address:

<input type="email">

Depending on browser support, the e-mail address can be automatically validated when submitted.

HTML file: Displayed by browser:
<form action="http://www.w3schools.com/html/action_page.php">
  E-mail:
  <input type="email" name="email">
  <input type="submit">
</form>
E-mail:

Take note that some smartphones recognize the email type, and adds ".com" to the keyboard to match email input. This does not work in Safari.

Back button Table of Contents Next button