Input type URL in HTML5


This accepts only URL value in HTML5. 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.qries.com format or in http://qries.com format.

<!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>

Updated on: 29-Jan-2020

200 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements