HTML5 input types and form elements.

Many new input elements are introduced in the html5 specification. Here you will find a list of these elements and how these elements look in Chrome. The tags are tested in SRWare Iron browser which is based on Chrome.

If an element is not recognized by the browser, it will be treated as <input type="text">.

Some attributes are also added in html5 such as "autofocus", "placeholder", "required" etc.

The <form> element has an attribute named "novalidate". If you don't want the browser to validate the values of input elements, you can use this attribute.

 

1) Email: <input type="email" placeholder="abc@qoncious.com" autofocus>

input type email

 

2) URL: <input type="url" name="url">

input type url

 

3) Search: <input type="search" placeholder="Search">

input type search

 

4) Number: <input type="number" min="-10" max="10" step="2" value="0">

input type number

 

5) Range: <input type="range" min="-10" max="10" step="2" value="0">

input type range

 

6) Date time related: These are not well supported by all browsers.

<input type="date">

input type date


<input type="month">

input type month


<input type="week">

input type week


<input type="time">

input type time

 

7) Color picker: <input type="color">

input type color

McAfee APAC


You might want to contribute to Qoncious.com:




Latest Videos