Choosing the Right Input

The right input type gives a phone the right keyboard and the browser a way to check the answer. You will use email, number, date and other input types, checkboxes and radio buttons grouped with fieldsets, dropdowns, text areas and suggestions.

Updated

Input Types

  1. Input Types for Email, Numbers, Dates and More (Apprentice): One attribute, type, tells the browser what kind of answer an input is for, so a phone shows the right keyboard and the browser checks some answers for you.

Choices

  1. Checkboxes, Radio Buttons and Fieldsets (Apprentice): Radio buttons let a visitor pick exactly one choice and checkboxes any number, and a fieldset with a legend groups them so everyone, screen-reader users too, knows what each choice answers.
  2. Dropdowns, Text Areas and Suggestions (Apprentice): A select makes a dropdown list of options, a textarea gives room for a longer answer, and a datalist suggests answers while still letting the visitor type their own.

Exercise: A Pizza Order Form

  1. Exercise: A Pizza Order Form (Apprentice): Build Slice of Heaven Pizza's online order form with radio buttons, checkboxes, a dropdown, typed inputs and a text area, then send it and see exactly what the kitchen receives.