MCQs on Advanced Multimedia Features | HTML

Explore advanced multimedia features in HTML with 30 multiple-choice questions covering interactive media, embedding media streams, and customizing <audio> and <video> players using JavaScript. This guide is perfect for web developers looking to enhance multimedia integration.


Interactive Media: Adding Captions, Subtitles (<track>)

  1. Which HTML tag is used to specify subtitles for a video?
    a) <caption>
    b) <sub>
    c) <track>
    d) <video>
  2. What is the purpose of the <track> tag in HTML?
    a) To add music to the video
    b) To specify metadata for the video
    c) To add captions, subtitles, or descriptions to the video
    d) To change video resolution
  3. What is required inside the <track> tag to define the subtitles?
    a) src attribute
    b) video source
    c) audio source
    d) playback rate
  4. Which attribute of the <track> tag specifies the type of text track?
    a) kind
    b) type
    c) src
    d) label
  5. What is the default kind of track for the <track> tag if no kind is specified?
    a) subtitles
    b) captions
    c) descriptions
    d) metadata
  6. Which of the following is an appropriate file format for subtitles in the <track> tag?
    a) .mp3
    b) .srt
    c) .wav
    d) .mp4
  7. What does the “srclang” attribute in the <track> tag specify?
    a) Language of the video
    b) Language of the track
    c) Source of the video
    d) Source of the track
  8. Can multiple <track> tags be added to a video?
    a) Yes, for different languages and formats
    b) No, only one <track> tag is allowed
    c) Yes, but only for audio tracks
    d) Yes, but only for captions
  9. What does the “default” attribute in the <track> tag indicate?
    a) To display the track by default
    b) To enable autoplay for the track
    c) To indicate the track type
    d) To add the track as a background music
  10. Which of the following is a valid value for the “kind” attribute in the <track> tag?
    a) audio
    b) caption
    c) subtitle
    d) description

Embedding Media Streams

  1. What HTML tag is used to embed audio or video media on a webpage?
    a) <media>
    b) <video>
    c) <embed>
    d) <audio>
  2. Which protocol is commonly used for embedding media streams in HTML5?
    a) FTP
    b) HTTP
    c) RTSP
    d) HTTPS
  3. Which HTML tag allows embedding a streaming video from YouTube or other media platforms?
    a) <media>
    b) <video>
    c) <iframe>
    d) <embed>
  4. What attribute in the <video> tag specifies the source URL for the media stream?
    a) source
    b) src
    c) file
    d) url
  5. Which video streaming format is typically supported by the HTML5 <video> element?
    a) .flv
    b) .mp4
    c) .mkv
    d) .mov
  6. What is the purpose of the “controls” attribute in the <audio> and <video> tags?
    a) To loop the media
    b) To automatically play the media
    c) To add play, pause, and volume buttons
    d) To adjust the resolution of the media
  7. Can you stream live media using the HTML5 <video> element?
    a) Yes, by using a proper streaming protocol
    b) No, the <video> element only supports recorded media
    c) Yes, by adding a live flag to the <video> element
    d) No, live streaming is only possible with the <audio> element
  8. Which attribute is used to specify the media type in the <audio> or <video> tag?
    a) type
    b) format
    c) media-type
    d) mime-type
  9. How do you specify the poster image that appears before a video plays?
    a) Using the “poster” attribute in the <video> tag
    b) Using the “cover” attribute in the <audio> tag
    c) By using an <img> tag before the video
    d) By using the “src” attribute in the <track> tag
  10. What does the “preload” attribute in the <audio> or <video> tag control?
    a) The looping behavior of the media
    b) Whether to preload the media before playback
    c) The media resolution
    d) The font size of subtitles

Customizing <audio> and <video> with JavaScript

  1. Which JavaScript method is used to play an audio or video element?
    a) play()
    b) start()
    c) begin()
    d) run()
  2. How do you pause an <audio> or <video> element using JavaScript?
    a) pause()
    b) stop()
    c) end()
    d) halt()
  3. Which JavaScript method is used to change the current time of an <audio> or <video> element?
    a) setTime()
    b) changeTime()
    c) currentTime()
    d) seekTo()
  4. How can you check if an audio or video element is paused using JavaScript?
    a) element.isPaused()
    b) element.paused
    c) element.playing
    d) element.state == ‘paused’
  5. Which JavaScript event is triggered when an audio or video finishes playing?
    a) onplay
    b) onpause
    c) onended
    d) onstop
  6. What is the correct JavaScript method to mute an audio or video element?
    a) mute()
    b) volume = 0
    c) setMute()
    d) audio.muted = true
  7. Which JavaScript property can be used to control the volume of an audio or video element?
    a) volume()
    b) volumeLevel
    c) volume
    d) soundLevel
  8. How do you loop an audio or video element using JavaScript?
    a) element.loop = true
    b) element.repeat = true
    c) element.replay()
    d) element.cycle = true
  9. What does the “autoplay” attribute do when used in <audio> or <video> tags?
    a) Starts the media automatically when the page loads
    b) Loops the media continuously
    c) Displays a preview of the media
    d) Makes the media pause automatically
  10. How do you control whether a video element shows a poster image before playing, using JavaScript?
    a) video.poster = ‘image.jpg’;
    b) video.showPoster = true;
    c) video.posterImage()
    d) video.displayPoster = true;

Answer Key:

QnoAnswer
1c) <track>
2c) To add captions, subtitles, or descriptions to the video
3a) src attribute
4a) kind
5b) captions
6b) .srt
7b) Language of the track
8a) Yes, for different languages and formats
9a) To display the track by default
10b) caption
11b) <video>
12c) RTSP
13c) <iframe>
14b) src
15b) .mp4
16c) To add play, pause, and volume buttons
17a) Yes, by using a proper streaming protocol
18a) type
19a) Using the “poster” attribute in the <video> tag
20b) Whether to preload the media before playback
21a) play()
22a) pause()
23c) currentTime()
24b) element.paused
25c) onended
26b) volume = 0
27c) volume
28a) element.loop = true
29a) Starts the media automatically when the page loads
30a) video.poster = ‘image.jpg’;

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top