Skip to content
Related Articles

Related Articles

HTML | <input type=”url”>

View Discussion
Improve Article
Save Article
  • Last Updated : 02 Jun, 2022
View Discussion
Improve Article
Save Article

The HTML <input type=”url”> is used to define a field that entered a URL. This input value is automatically validated before submitted the form. 

Syntax: 

<input type="url"> 

Example: 

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML Input Type URL
    </title>
</head>
<style>
    #Geek_p {
        font-size: 30px;
        color: green;
    }
</style>
 
<body style="text-align:center;">
 
    <h1 style="color:green;">
            GeeksForGeeks
        </h1>
 
    <h2>HTML &lt;Input Type="URL"&gt;
</h2>
    <form>
        <input type="url"
               placeholder="search a URL">
        <br>
        <br>
 
    </form>
</body>
 
</html>

Output:

  

Supported Browsers:

  • Google Chrome 1 and above
  • Firefox
  • Edge 12 and above
  • Opera 11 and above
  • Internet Explorer 10 and above
  • Apple Safari
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!