Add an input of type email.
Acceptance criteria
- 1.Add an input of type email.
HTML Tutorial · HTML Forms
These 10 tasks go with the HTML Input Types 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: “The type attribute decides what an is: a text box, a checkbox, a date picker, a file chooser. Picking the right one gets you the right on-screen keyboard on phones, some validation for free, and a control users already know how to operate. Picking the wrong one quietly breaks the form.” .
1.Add an email fieldexercise · easy · 10 min
Add an input of type email.
Passes when: Add an input of type email.
2.Add a password fieldexercise · easy · 10 min · practice plan
Add an input of type password.
Passes when: Add an input of type password.
3.Add a number fieldexercise · easy · 10 min · practice plan
Add an input of type number.
Passes when: Add an input of type number.
4.Add a checkboxexercise · easy · 10 min · practice plan
Add an input of type checkbox.
Passes when: Add an input of type checkbox.
5.Add a date pickerexercise · medium · 10 min · practice plan
Add an input of type date.
Passes when: Add an input of type date.
6.Fix the text field used for emailbug fix · easy · 8 min
Use the email type so browsers validate the format.
Passes when: Use the email type so browsers validate the format.
7.Fix the visible passwordbug fix · easy · 8 min · practice plan
A password field must not use type text.
Passes when: A password field must not use type text.
8.Fix the invented typebug fix · easy · 8 min · practice plan
There is no "digits" input type.
Passes when: There is no "digits" input type.
9.Fix the radio used for a single togglebug fix · easy · 8 min · practice plan
A single on/off choice should be a checkbox.
Passes when: A single on/off choice should be a checkbox.
10.Fix the missing typebug fix · easy · 8 min · practice plan
Without a type the field defaults to text.
Passes when: Without a type the field defaults to text.
Between them these tasks cover Input types and Choosing the right control.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.