← HTML & CSS learning pathHTML & CSS · Module 3 of 10
Forms
Collect user input with forms, inputs, labels and buttons.
📖 Key ideas
- <form> wraps inputs and submits them.
- Input types: text, email, password, number, date, checkbox, radio.
- Always connect <label for="id"> to its input.
- required, min, max and pattern give built-in validation.
- <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