Add a video with controls.
Acceptance criteria
- 1.Add a video with controls.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <video> 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 embed video files directly into a webpage. It supports multiple formats such as MP4, WebM, and Ogg, and provides built-in playback controls for users to play, pause, or adjust volume.” .
1.Add a video playerexercise · easy · 10 min
Add a video with controls.
Passes when: Add a video with controls.
2.Set a posterexercise · easy · 10 min · practice plan
Show a still image before playback starts.
Passes when: Show a still image before playback starts.
3.Give it a sizeexercise · easy · 10 min · practice plan
Set the video's width and height.
Passes when: Set the video's width and height.
4.Use a source elementexercise · easy · 10 min · practice plan
Supply the file with a nested source.
Passes when: Supply the file with a nested source.
5.A silent autoplaying clipexercise · medium · 10 min · practice plan
Autoplay a muted, looping video with controls.
Passes when: Autoplay a muted, looping video with controls.
6.Fix the video with no controlsbug fix · easy · 8 min
Give the viewer a way to play and pause.
Passes when: Give the viewer a way to play and pause.
7.Fix the poster in the wrong attributebug fix · easy · 8 min · practice plan
The still frame is the poster attribute.
Passes when: The still frame is the poster attribute.
8.Fix the size set only in CSSbug fix · easy · 8 min · practice plan
Set real width and height so the layout does not jump.
Passes when: Set real width and height so the layout does not jump.
9.Fix the image element used for videobug fix · easy · 8 min · practice plan
A video needs the video element.
Passes when: A video needs the video element.
10.Fix the autoplay with soundbug fix · easy · 8 min · practice plan
Browsers block autoplay unless the video is muted.
Passes when: Browsers block autoplay unless the video is muted.
Between them these tasks cover Video playback, poster and muted autoplay.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.