Email URL Phone
08-05-2017    951 times
HTML 5 Forms : Email, URL, Phone no


Three most common control used in web page is

  • Email
  • URL
  • Contact no or Phone no

All of the controls have their own unique style.


The Basic format of email is, here ".com"may replaced by ".net", ".in" or ".something else". But in this case if we write somename@servername, then HTML cannot find any error.


URL Generally have one dot in middle and end with different domain name like

  1. .com
  2. .in
  3. .net
  5. .gov
  6. .edu
  7. .mil
  8. .au
  9. .pk
Private Teacher

And so on. Here a user must input the http://something.something then HTML cannot find any error.

Phone No

A phone number is just a no. It has no alphabet. General contact no in India have is a 10 digit no.

These controls are not used for data validation. For data validation we will have to use the regular expression.These three controls are similar to the normal textbox. But if we use the wrong format for the URL and email then only browser shows an error message (when we click on the submit button). But if the user uses the touch screen and iPhone 4 (iOS 4.2) and HTC Desire (Android 2.2) the different keyboard appears on selection of different controls.

Here is how the code looks like.

Tutorial at home
Tutorial at home
<!DOCTYPE html>
<html> <head> <title>Contact No, Email, Website Demo</title> </head>
<form name="f1">
Contact No<input id="phone" type="tel" />
<input type="submit" />
<form name="f2">
Email<input id="email" type="email"/>
<input type="submit" />
<form name="f3">
Website<input id="website" type="url"/>
<input type="submit" />
HTML 5 Contact, eMail & Website
Contact, eMail & Website
    Author Details
Arnab De
I have over 16 years of experience working as an IT professional, ranging from teaching at my own institute to being a computer faculty at different leading institute across Kolkata. I also work as a web developer and designer, having worked for renowned companies and brand. Through tutorialathome, I wish to share my years of knowledge with the readers.
    Related Post
  Query About the post