<input type="email">

Example

Usage

<input
  type="email"
  multiple
  pattern=".+@example.com"
  required
  title="Enter an @example.com address only"
/>

Description

The email type is useful when collecting email addresses. It requires they fit the pre-defined format of an email address without requiring any JavaScript validation.

It can take an optional pattern attribute in order to provide more strict matching. Make sure to also supply a title attribute alongside it so the browser can tell the user why their input is not valid.