Audio and Video Flashcards
What is the purpose of the src attribute in the <audio>
and <video>
elements?
The src
attribute is used to embed media, such as audio or video, by specifying the media file’s location.
What does the controls
attribute do in the <audio>
and <video>
elements?
The controls
attribute displays player controls, allowing users to control playback (play, pause, volume).
What does the autoplay
attribute do in the <audio>
and <video>
elements?
The autoplay
attribute starts the media playback automatically when the page is loaded.
What is the function of the <track>
element in <audio>
and <video>
elements?
The <track>
element adds timed text tracks like subtitles, specifying the language and file source.
How can multiple media sources be provided for <video>
?
Multiple media sources
can be provided using <source>
elements inside the <video>
tag, each with different src
and type
attributes.
What is the poster
attribute used for in the <video>
element?
The poster
attribute specifies an image to be shown before the video loads.
What is the purpose of the preload
attribute in <audio>
and <video>
elements?
The preload attribute preloads the media for faster start of playback.