Add a captions track to a video.
Acceptance criteria
- 1.Add a captions track to a video.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <track> 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 add text tracks (like subtitles, captions, descriptions, or chapters) to and elements. It improves accessibility by providing text alternatives for users who are deaf, hard of hearing, or non-native speakers.” .
1.Add captionsexercise · easy · 10 min
Add a captions track to a video.
Passes when: Add a captions track to a video.
2.Set the languageexercise · easy · 10 min · practice plan
Say which language the track is in.
Passes when: Say which language the track is in.
3.Label the trackexercise · easy · 10 min · practice plan
Give the track a human-readable label.
Passes when: Give the track a human-readable label.
4.Make it the defaultexercise · easy · 10 min · practice plan
Turn the captions on by default.
Passes when: Turn the captions on by default.
5.A fully described trackexercise · medium · 10 min · practice plan
Add a labelled, default English captions track.
Passes when: Add a labelled, default English captions track.
6.Fix the missing kindbug fix · easy · 8 min
A track must say what sort of text it carries.
Passes when: A track must say what sort of text it carries.
7.Fix the language in the wrong attributebug fix · easy · 8 min · practice plan
A track's language is srclang.
Passes when: A track's language is srclang.
8.Fix the unlabelled trackbug fix · easy · 8 min · practice plan
The menu entry has no name.
Passes when: The menu entry has no name.
9.Fix the captions that stay offbug fix · easy · 8 min · practice plan
These captions are meant to show by default.
Passes when: These captions are meant to show by default.
10.Fix the track placed outside the videobug fix · easy · 8 min · practice plan
A track belongs inside the media element.
Passes when: A track belongs inside the media element.
Between them these tasks cover Captions, kind and srclang and Default track.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.