Languages
[Edit]
EN

HTML - email input

0 points
Created by:
Isaiah89
361

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

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