Make the form submit into a new tab.
Acceptance criteria
- 1.Make the form submit into a new tab.
HTML Tutorial · HTML Forms
These 10 tasks go with the HTML Form Attributes chapter. 5 of them ask you to build something small from scratch; 5 give you code that is already broken and ask you to work out why. Set aside about 90 minutes for the whole set, though you can do them in any order.
Nothing here is marked by a person. When you press Submit, the editor checks your code against the points listed under each task and tells you straight away what passed and what didn't (you need a free account to submit). If you get stuck, there are hints, and a worked solution once you've had a go. The first 2 tasks are free; the rest are part of the practice plan.
If it's been a while since you read the chapter, here is how it starts: “HTML elements contain several attributes that define how form data is collected, processed, and submitted. These attributes control important aspects such as where and how the data is sent, how it is encoded, and how the form behaves during submission.” .
1.Target a new tabexercise · easy · 10 min
Make the form submit into a new tab.
Passes when: Make the form submit into a new tab.
2.Turn off autocompleteexercise · easy · 10 min · practice plan
Disable autocomplete on the form.
Passes when: Disable autocomplete on the form.
3.Name the formexercise · easy · 10 min · practice plan
Give the form the name "signup".
Passes when: Give the form the name "signup".
4.Set the encoding for uploadsexercise · easy · 10 min · practice plan
Use multipart/form-data so files can upload.
Passes when: Use multipart/form-data so files can upload.
5.Skip built-in validationexercise · medium · 10 min · practice plan
Add novalidate to the form.
Passes when: Add novalidate to the form.
6.Fix the wrong target valuebug fix · easy · 8 min
A new tab uses _blank, not new.
Passes when: A new tab uses _blank, not new.
7.Fix the missing encodingbug fix · easy · 8 min · practice plan
File uploads need multipart/form-data.
Passes when: File uploads need multipart/form-data.
8.Fix autocomplete spelled wrongbug fix · easy · 8 min · practice plan
The attribute is autocomplete.
Passes when: The attribute is autocomplete.
9.Fix the id used instead of namebug fix · easy · 8 min · practice plan
The form should be named, not just given an id.
Passes when: The form should be named, not just given an id.
10.Fix the validation flagbug fix · easy · 8 min · practice plan
The attribute is novalidate, not no-validate.
Passes when: The attribute is novalidate, not no-validate.
Between them these tasks cover action, method, autocomplete and novalidate.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.