HTML Forms Overview — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the HTML Forms Overview lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Exercises(5)
- 1
Add a form
easy10 minAdd a form element containing a submit button.
- 2
Set the action
easy10 minPoint the form at /subscribe.
- 3
Set the method
easy10 minMake the form submit with POST.
- 4
Name a field
easy10 minAdd a text input named email so it is submitted.
- 5
Build a minimal working form
medium10 minCombine action, method, a named field and a submit button.
Find the bug(5)
- 1
Fix the input outside the form
easy8 minA field outside the form is never submitted.
- 2
Fix the missing name
easy8 minWithout a name the value is never sent.
- 3
Fix the wrong method value
easy8 minThe method should be post, not send.
- 4
Fix the wrong attribute for the target
easy8 minForms use action, not href.
- 5
Fix the div used as a form
easy8 minA div cannot submit anything.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace