Mark a date with a machine-readable value.
Acceptance criteria
- 1.Mark a date with a machine-readable value.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <time> 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 defines a specific time or date , or both. It helps browsers, search engines, and assistive technologies understand the time-related data in a machine-readable format using the datetime attribute.” .
1.Mark up a dateexercise · easy · 10 min
Mark a date with a machine-readable value.
Passes when: Mark a date with a machine-readable value.
2.Mark up a timeexercise · easy · 10 min · practice plan
Mark a clock time.
Passes when: Mark a clock time.
3.A publication dateexercise · easy · 10 min · practice plan
Put a dated time element inside an article.
Passes when: Put a dated time element inside an article.
4.Two datesexercise · easy · 10 min · practice plan
Mark a start and an end date.
Passes when: Mark a start and an end date.
5.A dated postexercise · medium · 10 min · practice plan
Build an article with a heading and a dated time element.
Passes when: Build an article with a heading and a dated time element.
6.Fix the date with no machine valuebug fix · easy · 8 min
A time element needs a datetime attribute.
Passes when: A time element needs a datetime attribute.
7.Fix the span used for a timebug fix · easy · 8 min · practice plan
Times have their own element.
Passes when: Times have their own element.
8.Fix the date outside the articlebug fix · easy · 8 min · practice plan
A publication date belongs with its post.
Passes when: A publication date belongs with its post.
9.Fix the missing end datebug fix · easy · 8 min · practice plan
Only the start of the range was marked up.
Passes when: Only the start of the range was marked up.
10.Fix the wrong date formatbug fix · easy · 8 min · practice plan
The datetime value uses YYYY-MM-DD.
Passes when: The datetime value uses YYYY-MM-DD.
Between them these tasks cover Machine-readable dates, datetime and Publication dates.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.