Sikau

HTML · Day 11 · about 25 min

Input types

The right keyboard and control for each answer.

The right tool for each answer

Typing a date by hand is fiddly; choosing from a calendar is easy. HTML has input types for emails, numbers, dates, choices and more — and on phones each one brings up the right keyboard.

Types, choices and long text

  • Radio buttons with the same name form one group: pick one.
  • Checkboxes: tick any number.
  • fieldset + legend group related controls and name the group.
  • select for a list of options; textarea for long text.

The rest of this lesson

  • Choosing the right typeexplain
  • select, datalist and textareaexplain
  • Which type?predict
  • Match the typematch
  • Your turnwrite code
  • Badge quizquiz
  • What you learnedrecap

Continue this lesson free — run real code in your browser

Continue with Google

See all 17 lessons of HTML