Key facts
How does a url input behave?
A url input blocks submit unless the value is an absolute URL with a scheme, so example.com fails and https://example.com passes. Any scheme passes, so it does not prove the link is safe.
| Fact | Detail |
|---|---|
| Mobile keyboard | A URL keyboard, often with / and .com keys. |
| Built-in validation | The value must be an absolute URL with a scheme, or it fails with typeMismatch. example.com and www.example.com both fail. |
| Any scheme passes | ftp:, mailto: and javascript: URLs all pass, so the check does not prove the link is safe. |
| Submitted value | The URL with outer spaces trimmed. |
| Empty field | An empty field passes unless you add required. |
pattern | The whole value must match. pattern="https://.*" forces https. |
Sources: WHATWG HTML Standard: URL state (type=url) · MDN: <input type="url">




