HTML input type email Tutorial

In this section, we will learn what the <input type = “email”> element is and how to use it.

What is input type email in HTML?

The <input type = “email”> element is used to create a field in a document where people can enter an email address.

This field automatically checks the input value against the pattern of an email; if the input value didn’t match the pattern of an email, browsers display a message that the email is not correct. If the email field is in a form and we put a wrong email, the form won’t submit!

(Sometimes only the input field is highlighted with red color to signal the input value is not correct).

HTML input type email Syntax:

<input type = “email”>

HTML input type email Return Values

The return value of this element is the emails that users entered into that email field.

Example: using <input type=”email”> in HTML

See the Pen using <input type="email"> in HTML by Omid Dehghan (@odehghan) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies