Languages
[Edit]
EN

HTML - email input

0 points
Created by:
Isaiah89
721

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>

References

Alternative titles

  1. HTML - input type email
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

HTML - input element types

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join