Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

HTML <input type="url">

❮ HTML <input> type attribute


Define a field for entering a URL:

<label for="homepage">Add your homepage:</label>
<input type="url" id="homepage" name="homepage">
Try it Yourself »

Definition and Usage

The <input type="url"> defines a field for entering a URL.

The input value is automatically validated before the form can be submitted.

Tip: Always add the <label> tag for best accessibility practices!

Browser Support

The numbers in the table specify the first browser version that fully supports the element.

type="url" Yes 10.0 Yes Yes 10.1


<input type="url">

❮ HTML <input> type attribute