New input types in HTML5

Nithadeepak
Posted by Nithadeepak under HTML 5 category on | Points: 40 | Views : 2396
[<input type="email" id="txtEmail"  required="true" />

required="true" validates reuired field. No need to write javascript.
type="email"- value of the email field is automatically validated
Browser Support
FireFox 4.0+
Opera 9.0
Chrome 10.0


<input  type="url" id="txtUrl" required="true"

Only a URL can be entered into the field. Automatically validates the URL field
Browser Support
FireFox 4.0+
Opera 9.0
Chrome 10.0



<input type="range" min="0" max="100" />

input fields that should contain a value from a range of numbers.
Displayed as a slider bar.
Browser Support
Opera 9.0
Chrome 4.0
Safari 4.0


<input type="number"  min="1" max="10" />

input fields that should contain a numeric value
Browser Support
Opera 9.0
Chrome 7.0


<input type="color"  />
The Opera 11 browser will allow to select a color from a color picker,
Google's Chrome 12 will only allow hexadecimal color values to be submitted:

Comments or Responses

Login to post response