Mark a product name with its id.
Acceptance criteria
- 1.Mark a product name with its id.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <data> Tag 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 tag is used to associate machine-readable data with human-readable content . It allows the browser or scripts to understand the value of a text while still displaying a friendly version to users.” .
1.Attach a machine valueexercise · easy · 10 min
Mark a product name with its id.
Passes when: Mark a product name with its id.
2.A numeric valueexercise · easy · 10 min · practice plan
Give a written number a machine-readable value.
Passes when: Give a written number a machine-readable value.
3.Data in a listexercise · easy · 10 min · practice plan
Put a data element inside a list item.
Passes when: Put a data element inside a list item.
4.Two productsexercise · easy · 10 min · practice plan
Mark two products with their ids.
Passes when: Mark two products with their ids.
5.A priced productexercise · medium · 10 min · practice plan
Show a product with its id and a marked-up price.
Passes when: Show a product with its id and a marked-up price.
6.Fix the missing machine valuebug fix · easy · 8 min
A data element needs a value attribute.
Passes when: A data element needs a value attribute.
7.Fix the value in the wrong attributebug fix · easy · 8 min · practice plan
Machine values go in value, not data-value.
Passes when: Machine values go in value, not data-value.
8.Fix the span used for a productbug fix · easy · 8 min · practice plan
A machine-readable value belongs in a data element.
Passes when: A machine-readable value belongs in a data element.
9.Fix the second product left plainbug fix · easy · 8 min · practice plan
Both products need their ids.
Passes when: Both products need their ids.
10.Fix the time element used for a pricebug fix · easy · 8 min · practice plan
time is for dates; a price uses data.
Passes when: time is for dates; a price uses data.
Between them these tasks cover Machine-readable values, value attribute and Products.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.