Recall & Review
beginner
What is the purpose of the <audio> tag in HTML?
The <audio> tag is used to embed sound content in a web page, allowing users to play audio files directly in the browser.
Click to reveal answer
beginner
How do you add controls like play and pause to an audio element?
Add the
controls attribute inside the <audio> tag to show built-in play, pause, and volume controls.Click to reveal answer
beginner
What attribute do you use to specify the audio file source?
Use the
src attribute inside the <audio> tag or inside a nested <source> tag to specify the audio file URL.Click to reveal answer
intermediate
Why is it good to include multiple <source> tags inside an <audio> element?
Including multiple <source> tags with different audio formats helps ensure the audio plays on all browsers, as some support different formats.
Click to reveal answer
intermediate
What does the
autoplay attribute do in the <audio> tag?The
autoplay attribute makes the audio start playing automatically when the page loads, but it should be used carefully for user experience.Click to reveal answer
Which attribute adds play and pause buttons to an <audio> element?
✗ Incorrect
The
controls attribute adds built-in play, pause, and volume controls to the audio player.How can you provide multiple audio formats for better browser support?
✗ Incorrect
Multiple
<source> tags inside one <audio> tag allow the browser to pick the supported format.What happens if you add the
autoplay attribute to an <audio> tag?✗ Incorrect
The
autoplay attribute makes the audio start playing as soon as the page loads.Which tag is used inside <audio> to specify the audio file?
✗ Incorrect
The
<source> tag inside <audio> specifies the audio file and its format.What is the best practice for accessibility when using the <audio> tag?
✗ Incorrect
Providing captions or transcripts helps users who are deaf or hard of hearing understand the audio content.
Explain how to embed an audio file in a web page using the <audio> tag with controls and multiple formats.
Think about how to make audio playable and compatible across browsers.
You got /4 concepts.
Describe the purpose and effect of the
autoplay attribute in the <audio> tag and why it should be used carefully.Consider what happens when audio plays without user action.
You got /3 concepts.