Add an audio element with visible controls.
Acceptance criteria
- 1.Add an audio element with visible controls.
HTML Tutorial · HTML Tags
These 10 tasks go with the HTML <audio> 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 sound content in an HTML document, such as music, podcasts, or sound effects. It supports multiple audio formats and provides playback controls like play, pause, and volume.” .
1.Add an audio playerexercise · easy · 10 min
Add an audio element with visible controls.
Passes when: Add an audio element with visible controls.
2.Point at the fileexercise · easy · 10 min · practice plan
Set the audio source.
Passes when: Set the audio source.
3.Use a source elementexercise · easy · 10 min · practice plan
Supply the file with a nested source element.
Passes when: Supply the file with a nested source element.
4.Add fallback textexercise · easy · 10 min · practice plan
Tell older browsers what they are missing.
Passes when: Tell older browsers what they are missing.
5.A looping clipexercise · medium · 10 min · practice plan
Make the clip loop with controls shown.
Passes when: Make the clip loop with controls shown.
6.Fix the player with no controlsbug fix · easy · 8 min
Without controls there is no way to play it.
Passes when: Without controls there is no way to play it.
7.Fix the wrong attribute for the filebug fix · easy · 8 min · practice plan
Media points at its file with src.
Passes when: Media points at its file with src.
8.Fix the source written as an attribute listbug fix · easy · 8 min · practice plan
Multiple formats use nested source elements.
Passes when: Multiple formats use nested source elements.
9.Fix the fallback put outsidebug fix · easy · 8 min · practice plan
Fallback text goes between the audio tags.
Passes when: Fallback text goes between the audio tags.
10.Fix the missing loopbug fix · easy · 8 min · practice plan
The clip is meant to repeat.
Passes when: The clip is meant to repeat.
Between them these tasks cover Audio playback, controls and Fallbacks.
Looking for a different chapter? See every practice set, or switch to the interview theory questions.