HTML5 > Forms Elements

Validating Email in HTML5

How to detect if user has entered a valid email id in the textbox in HTML5?


In order to detect whether user has entered a valid email id in the TextBox we can set the type attribute to “Email”.

<body>
    <form>
        Email: <input name="myEmail" id="myEmail" name="myEmail" type="email" required
placeholder="Please enter a valid email address" /> </form> </body>

Output

 Views: 1139 | Post Order: 91



Write for us






Hosting Recommendations