Monday, July 6, 2015

What are the new input types provided by HTML 5 for forms?



Following are the important, new input types for forms provided by HTML 5:
- color – used for fields that should contain colour.
- date – allows the user to select a date
- datetime - allows the user to select a date and time (with time zone)
- datetime-local - allows the user to select a date and time (without time zone)
- email - used for input fields that should contain an e-mail address
- month - allows the user to select a month and year.
- number - used for input fields that should contain a numeric value. Restrictions on type of numbers accepted can be set.

- range - used for input fields that should contain a value from a range of numbers. Restrictions on type of numbers accepted can be set here as well.

- search - used for search fields
- tel - defines a field for entering a telephone number
- time - allows the user to select a time
- url - used for input fields that should contain a URL address
- week - allows the user to select a week and year

No comments:

Post a Comment