HTML5 - URL


Advertisements


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 https://www.example.com format or in https://example.com format.

Example

Live Demo
<!DOCTYPE HTML>

<html>
   <body>

      <form action = "/cgi-bin/html5.cgi" method = "get">
         Enter URL : <input type = "url" name = "newinput" />
         <input type = "submit" value = "submit" />
      </form>

   </body>
</html>

Output


html5_web_forms2.htm

Advertisements