HTML Questions & Answers – HTML5 Audio

This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “HTML5 Audio”.

1. There is an audio format supported across all browsers.
a) True
b) False
View Answer

Answer: b
Explanation: There are 3 formats that are used in HTML5 Audio and are .mp3, .m4a AAC also known as H.264 format.

2. Which of the following tag is used for audio in HTML5?

a) <bgsound>
b) <audio>
c) <video>
d) <canvas>
View Answer
Answer: b
Explanation: <video> tag is used for video clips in HTML5. <canvas> is for graphical user interface. The audio tag defines sound, such as music or other audio streams.
 
 

3. Which tag is used to defines multiple media resources for media elements audio and video?

advertisement
advertisement
a) <source>
b) <canvas>
c) <audio>
d) <video>
View Answer
Answer: a
Explanation: <video> tag is used for video clips in HTML5. <canvas> is for graphical user interface. The audio tag defines sound, such as music or other audio streams.defines multiple media resources for media elements, such as <video> and <audio>.
 
 

4. Which of the following browser does not support wav file format?
a) Opera
b) Firefox
c) Chrome
d) Internet Explorer
View Answer

Answer: d
Explanation: Opera, firefox, chrome and internet explorer are different kinds of browsers. Out of which audio file format named wav is not supported by internet explorer.
Note: Join free Sanfoundry classes at Telegram or Youtube

5. In HTML Audio/Video DOM __________ sets or returns the volume of the audio/video.
a) src
b) volume controls
c) volume
d) video Tracks
View Answer

Answer: c
Explanation: Src attribute gives current source of audio/video element. The videoTrack list is returned representing available video tracks by video track attribute. Volume attribute sets the current volume of video/audio.
advertisement

6. Which of the following attribute adds audio controls, like play, pause, and volume?
a) audio
b) controls
c) source
d) src
View Answer

Answer: b
Explanation: The audio attribute defines sound, such as music or other audio streams. Source attribute defines multiple media resources for media elements, such as <video> and <audio>. Src attribute gives current source of audio/video element. The controls attribute is a boolean attribute. When present, it specifies that audio controls should be displayed.

7. In HTML Audio/Video DOM __________ sets or returns whether the audio/video should start playing as soon as it is loaded.
a) controls
b) audio Tracks
c) autoplay
d) currentSrc
View Answer

Answer: c
Explanation: Control attribute is used to set whether audio/video should display controls. AudioTrack list representing audio tracks is set by audio track. The autoplay attribute is a boolean attribute. When present, the audio will automatically start playing as soon as it can do so without stopping. A current src of audio/video is returned by currentSrc.
advertisement

8. In HTML Audio/Video DOM __________ sets or returns whether the audio/video should start over again when finished.
a) loop
b) autoplay
c) seeking
d) played
View Answer

Answer: a
Explanation: The loop attribute is a boolean attribute. When present, it specifies that the audio will start over again, every time it is finished. With autoplay, it ensures whether video/audio should play immediately after loading page. Seeking returns whether user is currently seeking video/audio. Timeranges representing played parts of audio/video is set by played attribute.

9. In HTML Audio/Video DOM __________ returns a MediaError object representing the error state of the audio/video.
a) ended
b) seeking
c) error
d) mediaGroup
View Answer

Answer: c
Explanation: Seeking returns whether user is currently seeking video/audio. Ended attribute fires up when current playing playlist is finished. The error property returns a MediaError object. The MediaError object has a code property containing the error state of the audio/video. The group to which audio/video belongs is returned by mediaGroup.

10. In HTML Audio/Video DOM __________ returns a TextTrackList object representing the available text tracks.
a) readyState
b) startDate
c) videoTracks
d) textTracks
View Answer

Answer: d
Explanation: The current ready state of video/audio is set by readyState. StartDate sets current date representing current time offsets. VideoTrack returns video track list representing available video tracks. The textTracks property returns a TextTrackList object. The TextTrackList object represents the available text tracks for the audio/video. Each available text track is represented by an TextTrack Object.

Sanfoundry Global Education & Learning Series – HTML.

To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.