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">