logo
logo
Sign in

HTML 5

avatar
Shivani Mude
HTML 5

HTML5 has introduced several new <input> types like email, date, time, color, range etc. to make the form more interactive and improvise the user experience. If a browser is unable to recognize these new input types, it will take them as a normal text box.

We’ll take a quick look at each of the following new input forms in this section:

  1. color 2. date 3. datetime-local 4. email 5. month 6. number 7. range 8. search 9. tel 10. time 11. url 12.week

Input Type Color

The color input type allows the user to choose a color from a color picker and returns the color value in hexadecimal (#rrggbb) format. The default color value is #000000(black).

Example

<form>
<label for=”newcolor”>Choose Color:</label>
<input type=”color” id=”newcolor”>
</form>

Input Type Date

The date input type allows the user to choose a date from a drop-down calendar. The date value includes the day, month, and year.

Example

<form>
<label for=”newdate”>Select Date:</label>
<input type=”date” value=”2019–04–15" id=”newdate”>
</form>

Know more in this html tutorial blog…

collect
0
avatar
Shivani Mude
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more