Forms that collect input
Forms let visitors type information. <input> makes a box to type in, and type="email" tells phones to show the email keyboard.
Every input needs a <label>. When the label's for attribute matches the input's id, clicking the label puts the cursor in the box, and screen readers announce the label.
A <button> inside the form sends it.
Example
<form>
<label for="name">Your name</label>
<input id="name" type="text">
<button>Send</button>
</form>
Ids must be unique on the page. Pick a clear one like
id="email".Your tasks
0 of 3 done- Add an input with an id
- Add a <label> whose for matches that input's id
- Add a button that submits the form
Tutor
The tutor guides you toward the answer instead of handing it over. It uses your own Claude usage.
Quick check
Why match a label's for to an input's id?
No problems found. Unclosed tags, missing semicolons and errors show up here in plain words.