HTML Email, URL and Telephone Input Types
Email fields
Use type="email" to request an email address. The browser checks a basic address syntax before ordinary form submission. multiple permits a comma-separated address list. Use autocomplete="email" for an email contact field.
<label> Email <input type="email" name="email" autocomplete="email" value="reader@example.com"></label>The fictional address meets the browser syntax check.
URL fields
type="url" expects an absolute URL, such as one starting with https://. A bare domain is not enough for this type. The browser does not visit the destination to verify it.
<label> Website <input type="url" name="site" value="example.com"></label>The starting value fails the URL syntax check; try https://example.com.
Telephone fields
type="tel" indicates a telephone number and may show a telephone-friendly keyboard. Because telephone formats differ worldwide, this type does not impose a universal format. Add format guidance when your application has a specific requirement.
<label> Phone <input type="tel" name="phone" autocomplete="tel" placeholder="+00 123 456"></label>The field accepts different formats; no universal telephone syntax check is supplied.
Common mistakes and practice
An empty optional field can be valid. required makes a value necessary. A syntactically valid email, URL or telephone string does not prove ownership, existence or safety. Validate data on the server and use separate verification when needed.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
HTML Email, URL and Telephone Input Types — Knowledge Check
Apply the form-control concepts from this lesson.
Which input type checks basic email syntax?
Which value is appropriate for a URL field?
Why does type="tel" not impose a single telephone format?
What does basic email syntax validation establish?
A telephone field needs a country-specific format rule. What should you add?