EN
HTML - email input
0
points
In this article, we would like to show you how to create and use email input element in HTML.
Quick solution:
<label>
<span>Enter an email:</span>
<input type="email" name="input-name" />
</label>
Note:
The
input
is automatically validated to ensure that it's either empty or a properly formatted e-mail address before the form can be submitted.
Practical example
In this section, we create email input using the input
element's type="email"
attribute and present the example usage inside the form
.
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<body>
<form>
<label>
<span>Enter an email:</span>
<input type="email" name="input-name" />
<input type="submit" />
</label>
</form>
</body>
</html>