Web Build 094

Forms and validation: Grouped choices

Build grouped choices inside the persistent Team directory: Grouped choices starter project.

Forms and validation
10 minutes Admin Lesson 94 of 120
formlabelinputrequiredaria-describedby
Lesson 94 of 120 0/120 lessons 0/18 missions Forms and validation · 10 minutes
0%
Continue View profile
Web fundamentals lab Simulated editor
New learnerrank 0XP 0%complete
Current edit

Create the form structure

Add the exact form and connected h2 for Grouped choices. The lab uses no action or submission method.

Target
index.html · Replace the placeholder inside main.
Evidence
The form-like practice region has an accessible name and no destination.
index.html html
Preview allowlisted render
Console text only
Instructions 10 minutes

Load exact snippets or type matching Web code. Run each task, compare the preview, then press Check to save the lesson.

Start with the Current task. Edit its named project file, press Run, compare the reviewed preview, then continue. Press Check only after every task is complete.

Create the form structure

Add the exact form and connected h2 for Grouped choices. The lab uses no action or submission method.

Target index.html · Replace the placeholder inside main. Evidence The form-like practice region has an accessible name and no destination. Snippet <form aria-labelledby="form-title" novalidate> <h2 id="form-title">Grouped choices</h2> </form>
Next up
Connect a label, input, and help text

Add the exact label, email input, required state, and described help text.

Target index.html · Inside the form after its h2. Evidence The label for, input id, and help id relationships all match. Snippet <label for="field-grouped-choices">Email for course notes</label> <input id="field-grouped-choices" name="email" type="email" required aria-describedby="field-grouped-choices-help"> <p id="field-grouped-choices-help">Use a complete email address.</p>
Next up
Add a non-submitting review state

Add the exact status message and type=button control, then Run and Check.

Target index.html · After the help text inside the form. Evidence A status region and non-submitting button provide a clear simulated outcome. Snippet <p id="field-grouped-choices-status" role="status">Ready to review locally.</p> <button type="button" aria-describedby="field-grouped-choices-status">Review details</button>
Next up
Lesson support

What to notice while you play.

Objective

Complete a project-shaped grouped choices build while preserving each passing edit.

Hint

Start with the Current task. Open index.html, use Show exact edit when needed, Run, then follow the highlighted next task.

Why it matters

Forms and validation becomes durable when every syntax choice is tied to a visible project outcome and a specific piece of evidence.

Common mistakes
  • Editing the wrong file instead of index.html.
  • Replacing earlier passing work instead of preserving it for the next step.
  • Pressing Check before every task has passed Run.
  • Expecting learner HTML, CSS, or JavaScript to execute; the preview uses reviewed scene states only.
Reference

Snippets in this lesson.

form / label / input

Build form structure with labels and validation hints.