Skip to content
Related Articles

Related Articles

Improve Article

HTML | <input type=”url”>

  • Last Updated : 30 May, 2019

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:




<!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 <Input Type="URL"
</h2>
    <form>
        <input type="url"
               placeholder="search a URL">
        <br>
        <br>
  
    </form>
</body>
  
</html>

Output:

Supported Browsers:

  • Google Chrome
  • Firefox
  • Edge 10.0
  • Opera 10.1
  • Apple Safari

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :