Command Palette

Search for a command to run...

Hectal
Phase 4: Forms
HTML · Exercise 4 of 5 PreviousNext
Intermediate

Book a table

Build a restaurant booking form with labelled fields and built-in rules:

a required date input named date that doesn't allow days before 2025-01-01; a required time input named time; a required number input named guests from 1 to 10; a required email input named email with the right autofill token; and an optional textarea named notes.

What Check tests

  1. date is a required date input that rejects days before 2025
  2. time is a required time input
  3. guests accepts 1 to 10 only
  4. email is a required email input with autocomplete="email"
  5. notes is an optional textarea
  6. A completely filled form is valid

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.