HTML Questions and Answers Part-16

1. Which of the following MP3 player has not been written in Flash?
a) musicplayer.sourceforge.net
b) www.wimpyplayer.com
c) flash-mp3-player.net
d) soundcloud.com

Answer: d
Explanation: There are several MP3 players that have been written in Flash like flash-mp3-player.net, www.wimpyplayer.com, musicplayer.sourceforge.net. Every player has different functionality. So you should be aware of that. Soundcloud.com and MySpace.com are different sites which provide a player that one can embed in the page.

2. Which of the following is not the attribute for <audio> element?
a) controls
b) src
c) preload
d) width

Answer: d
Explanation: <audio> element has various attributes like src, controls, autoplay, preload, loop, buffered, crossorigin, muted. Width is attribute basically use for <video> not for <audio> element. All the attributes and <audio> element is newly introduce by HTML5 to make page responsive and user friendly.

3. What is the work of controls?
a) specify the path to an audio file
b) indicates if the player displaying controls
c) audio starts playing automatically
d) play again after finishing the audio

Answer: b
Explanation: Controls attributes specify if the player is displaying controls or not. If one does not use it no control will be display by default. One can set his own control by using JavaScript. Syntax: <audio src=”example.ogg” controls autoplay>

4. Which element is used for inserting more than one audio file?
a) <source>
b) <src>
c) <command>
d) <ins>

Answer: a
Explanation: <src> provides or states location i.e Url of audio file. For inserting more than one audio file, use <source> instead of src attribute between <audio> and </audio>. This can be important because many browser support different formats for audio. For example MP3 is supported by Chrome6+, Safari 5+.

5. What is the work of src?
a) audio starts playing automatically
b) play again after finishing the audio
c) specify the path to an audio file
d) insert more than one audio

Answer: c
Explanation: src attribute basically specifies a path to the audio file. It is also used by <source> element which indicates where the audio file is located. Autoplay attribute starts playing audio automatically, loop plays audio again after it finishes.

6. Which of the following file extension is not used for audio MIME?
a) .ogv
b) .aac
c) .wav
d) .webm

Answer: a
Explanation: For accessing audios in different browsers we can use various extensions like .aac, .mp1, .mp1, .m4a, .mp2, .mpg, .mp3, .mpeg, .oga, .ogg, .wav, .webm. For video we have file extensions like .mp4, .ogv, .m4v, .webm. It is noticeable that some extensions are common both in audio and video. So user should pay attention where to put these as per the need.

7. Which format is a restricted version of Matroska?
a) WebM
b) Ogg Opus
c) Ogg Flac
d) MP4 Flac

Answer: a
Explanation: WebM format rely on the restricted version of Matroska format. WebM format is both for video and audio in HTML5. The MIME types as WebM files are audio/webM. This is the example where WebM media file is there only containing audio.

8. Which format is not supported in Internet Explorer?
a) WebM
b) Ogg Theora Vorbis
c) MP4 H.264
d) MP3

Answer: b
Explanation: Ogg format is supported in mobile, desktop, chrome, safari, opera. WebM is preferable over Ogg Theora Vorbis due to the better ratio of compression and quality and most of the browsers support WebM. Ogg format can be used to support old browsers. The MIME type of Ogg file that has audio is audio/ogg.

9. Which browser does not support MP4 H.264 format?
a) Opera
b) Chrome
c) Safari
d) Internet Explorer

Answer: a
Explanation: The MP4 H.264 format is supported by Safari, Chrome, Internet Explorer. Opera and Chromium do not support this format. This MP4 H.264 is used for both video and audio. This format is not freely licensed so commonly not that much used on an open web platform.

10. MP3 format is not supported by ____________
a) Firefox
b) Chrome
c) Safari
d) Opera

Answer: d
Explanation: MP3 audio format is supported by Firefox, Firefox for android as well as for iOs, Internet Explorer, Safari, and Chrome. The MIME type for audio is audio/mpeg, .mp3. Usually used with <audio> element. Opera does not support the MP3 format.