Lesson 8 of 10

📋 Forms & User Input

🎯 Grades 6–8 ⏱ ~30 minutes 🟡 Intermediate

What You'll Learn

  • How HTML forms collect user input
  • Common input types: text, email, number, checkbox, radio, select
  • How to use labels for accessibility and JavaScript to read form values
Quick Check

1. Which input type automatically validates an email address format?

Atype="text"
Btype="email"
Ctype="url"

2. What attribute links a <label> to its input?

Aname
Bfor (matching the input's id)
Cclass

3. To allow only one choice from a group, which input type should you use?

Acheckbox
Bradio
Cselect

4. Which HTTP method should you use for a login form?

AGET — sends data in the URL
BPOST — sends data in the request body
CPUT — replaces existing data