Tuesday, September 13, 2011

New Input Types in Html5

  
Html5 comes with new input types for forms that allows you do a better input control and validation.

Email

This input type ensures that the value entered is a valid email address.


<input type="email">


URL

This input type ensures that the value entered is a valid url.


<input type="url">


Number

The value must be a floating point number. When you enter a value which is not a number, it will be cleared after the focus moves away.


<input type="number"> 




Date

This input type is for selecting dates.


<input type="date">


Range

This input type allows you to select a value form a range of numbers.


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


Search

This input type is a search field, same as textbox.



<input type="search">

See Also:

0 comments:

Post a Comment