HTML: input type="email"
The email input is designed for an email address and gives browsers a useful validation hint and mobile keyboard.
What you will learn
- How to label an email field
- How browser validation and autocomplete help users
- Why client-side validation is not enough
Minimal example
<label for="email">Email address</label>
<input id="email" name="email" type="email"
autocomplete="email" required>The browser can reject values that do not look like an email address, and a phone may show an email-friendly keyboard. This is a usability aid, not proof that the address exists.
Common mistakes
- Keep a visible label; placeholder text is not a replacement.
- Validate and normalize the submitted value on the server.
- Use
multipleonly when the interface clearly accepts several addresses.