HTMLHTML · Lesson 10

Forms & Inputs

form, input types, labels, select, textarea and buttons.

Video tutorialTrack course · freeCodeCamp
Speed
Next lesson
Watch 00:00 · 1 checkpoints Watch on YouTube More on this topic
Transcript & captions
5/5

Forms collect user input. Every input should have a <label> connected with the for attribute matching the input's id — it improves accessibility and makes the label clickable.

typeUse
textSingle line of text
emailEmail with built-in validation
passwordMasked characters
numberNumeric with min/max/step
checkbox / radioMultiple or single choice
date / timeNative pickers
rangeSlider
fileUpload
Try it yourself

Knowledge check

0/1 answered

Which attribute links a <label> to its input?