HTML Audio — exercises and bug fixes
5 hands-on exercises and 5 find-the-bug challenges for the HTML Audio lesson. Every one is checked automatically in the browser — write the code, run it, and the tests tell you what still fails.
Exercises(5)
- 1
Add an audio player
easy10 minAdd an audio element with controls.
- 2
Offer two formats
easy10 minAdd two source elements inside audio.
- 3
Preload metadata only
easy10 minSet preload to metadata.
- 4
Loop the audio
easy10 minMake the clip repeat.
- 5
Add fallback text
medium10 minInclude a message for browsers without audio support.
Find the bug(5)
- 1
Fix the player with no controls
easy8 minWithout controls the user cannot play anything.
- 2
Fix the wrong element
easy8 minSound belongs in an audio element, not video.
- 3
Fix the sources outside the player
easy8 minSource elements must sit inside the audio element.
- 4
Fix the autoplay without controls
easy8 minAutoplaying with no controls traps the listener.
- 5
Fix the wrong preload value
easy8 minThe value should be metadata, not meta.
Ready to write the code?
The editor, the automatic checks and the worked solutions open up with an account.
Open the workspace