Web development · Lesson 05
Make forms easier to use
Build a form with labels, helpful feedback, and a clear success state.
- Connect labels to form controls
- Give useful feedback when an entry is missing
Helpful background: Semantic HTML and basic page structure.
A label is part of the control
Every input needs an understandable label. Connecting a label to its input gives the control a name and makes its clickable area easier to use.
Be specific about errors
Tell the learner what needs attention and how to fix it. Don’t rely on color alone: pair it with text, and keep focus near the field that needs action.
Accessible by default
Use native controls when they fit. They already support keyboard interaction and work with assistive technology. Add custom behavior only when it improves the experience.
<label for="email">Email address</label>
<input id="email" name="email" type="email" required>
<p id="email-help">Use an address you can access.</p>What connects this label to its input?
Your turn
A sign-up form rejects an empty email field. Write a short error message that tells the learner what to do.
“Enter your email address to continue.” is brief, specific, and gives the learner a next step.
BUILT TOGETHER
Help make this explanation better.
Have a clearer explanation, a useful example, or a correction? Share it with the community.
Be the first to add your name when you improve this lesson.
How to get credited