This input type is used for input fields that should contain a URL address. Depending on browser support, the URL field can be automatically validated when submitted.
HTML file: | Displayed by browser: |
---|---|
<form action="http://www.w3schools.com/html/action_page.php">
Add your homepage: <input type="url" name="homepage"> <input type="submit"> </form> |
Some smartphones recognize the URL type, and adds ".com" to the keyboard to match URL input. This input type is supported by most browsers, except Safari.