2.4 Audio & Video Flashcards
(13 cards)
What is the <audio> tag used for?</audio>
To embed sound files like music or speech on a webpage.
What is the <video> tag used for?</video>
To embed videos directly in the webpage.
What does the controls attribute do in <audio> & <video>?</video></audio>
Displays playback controls like play, pause, & volume.
What does the autoplay attribute do?
Starts playing the media automatically when the page loads.
what does the loop attribute do?
Makes the media replay automatically after it ends.
What does the muted attribute do?
Starts the media in a muted state.
What is the <source></source> element used for in media tags?
Allows you to provide multiple file formats for better browser compatilbilty.
How do you use multiple formats in <video>?</video>
<video>
<source></source>
<source></source>
</video>
Why include multiple source formats in <video> or <audio>?</audio></video>
Ensures cross-browser support, as not all browsers support all formats.
What is fallback message in <audio> or <video> tags?</video></audio>
Text that displays when the browser doesn’t support the tag.
Which audio formats are most supported in HTML?
MP3, Ogg, & WAV.
Which video formats are most supported in HTML?
MP4 (h.264), WebM.
Can directly embeding audio & video files to HTML slow down the webpage?
Yes, it can significantly slow down a webpage’s loading time, especially if not optimized.