Following example states the use of HTML5 control form validation.
Out of the above page is:
Thank you for reading!
Keep reading here
<!DOCTYPE html>
<html>
<body>
<h1> HTML5 Form Validation </h1>
<hr>
<form name=f1>
Enter name: <input type="text" pattern="[a-zA-Z]+" title="Your name without space" required /> </br>
Email id: <input type="email" required /> </br>
WebAddress: <input type="url" required/> starts with http:// </br>
Phone number: <input type="tel" pattern="^\d{2}-\d{10}" required/> [e.g:91-9876543210] </br>
Enter date: <input type="date"> </br>
Enter Age: <input type="number" size="6" name="age" min="18" max="99" value="21"></br>
<input type="submit" />
</form>
</body>
</html>
Out of the above page is:
Thank you for reading!
Keep reading here
No comments:
Post a Comment