Chapter 4. Using HTML5 Input Components

In this chapter we will take a look at some of the great new element types added to HTML5. Topics covered are:

  • Using the text input field
  • Using textarea
  • Inputting dates
  • Inputting time
  • Telephone input
  • Range input filed
  • Color picker input
  • Using single-choice dropdowns
  • Using multiple-choice select lists
  • Getting geographical location input
  • Using file inputs on client side
  • Using drag-and-drop file area

Introduction

Forms are part of everyday web application development. We did lot of re-inventions to enable various input features. HTML5 adds few new input types and many different attributes and extensions to the existing structure. Most of these new stuff are already available in modern browsers and make life easier for all of us. For the things that are not there yet, we use a fallback that works on legacy systems. There is no good reason why you should not start using at least some of the features today.

Note

There are various ways to determine support for HTML5 features. Many sites provide a list of supported features but some of them worth mentioning are http://caniuse.com/ and http://html5please.com/. You can often refer to them to get up to date information if you are not interested in adding fallback's.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.194.123