← HTML & CSS learning path
HTML & CSS · Module 3 of 10

Forms

Collect user input with forms, inputs, labels and buttons.

📖 Key ideas

  1. <form> wraps inputs and submits them.
  2. Input types: text, email, password, number, date, checkbox, radio.
  3. Always connect <label for="id"> to its input.
  4. required, min, max and pattern give built-in validation.
  5. <button type="submit"> sends the form.
💡 Real-life example: A form is like a printed application: labelled boxes to fill and a submit tray at the end.
<label>Text that describes an input
requiredInput must be filled
type="email"Input that checks email format
<select>Drop-down list