The Current State of HTML5 Forms

The url Type

<input type=url>

Live Demo



Firefox
4+
Safari
5+
Safari Mobile
iOS 3.1+
Chrome
10+
Opera
10.6+
IE
10+
Android
2.3+
Supported Kinda supported Kinda supported Supported Supported Supported Kinda supported

Supported Browser Screenshots

IE 11
iPad iOS7 Safari Keypad

The Low Down

The url input type is for absolute URLs, which, but definition, always include a protocol.

  • Safari, Chrome, Opera, Android and Firefox all simply require a single letter plus a colon: a: is valid. IE requires at least 2 letters before the colon. No browser requires a common protocol like http, https or ftp, or even //.
  • Mobile Safari does no validation, but brings up a keyboard which features an [/] and [.com] key, and removes the space key. Android, up to at least4.3, does not give users an URL specific keyboard.
  • If invalid, Firefox, Chrome, and IE provide an error message. Opera gives the element focus with no verbiage. Safari (Currently 7) does not provide constraint validation on form submission.
  • Cross browser verbiage:
    • Firefox: Please enter a URL.
    • Chrome: Please enter a URL.
    • IE: You must enter a valid URL
  • To ensure a particular protocol, use the pattern attribute
  • To not require a protocol,we'll be able to use the text input type with the inputmode attribute to at least get the best keypad in supporting browsers