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.