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
- 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
- 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.
- 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
- 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.