How to validate email with HTML5?

Spread the love

Sometimes, we want to validate email with HTML5.

In this article, we’ll look at how to validate email with HTML5.

How to validate email with HTML5?

To validate email with HTML5, we add an email input.

For instance, we write

<form>
  <input type="email" placeholder="Enter your email" />
  <input type="submit" value="Submit" />
</form>

to add an email inout by setting its type attribute to email.

Conclusion

To validate email with HTML5, we add an email input.

Leave a Reply

Your email address will not be published. Required fields are marked *