HTML5 - URL
It accepts only URL value. This type is used for input fields that should contain a URL address. If you try to submit a simple text, it forces to enter only URL address either in http://www.example.com format or in http://example.com format.
Example
<!DOCTYPE HTML>
<html>
<body>
<form action="/?originalUrl=https%3A%2F%2Fwww.tutorialspoint.com%2Fcgi-bin%2Fhtml5.cgi" method = "get">
Enter URL : <input type = "url" name = "newinput" />
<input type = "submit" value = "submit" />
</form>
</body>
</html>
Output
html5_web_forms2.htm
Advertisements