Which element supplies caption tracks for a video?

Prepare for the uCertify CIW Advanced HTML5 and CSS3 Specialist Exam. Dive into essential topics with flashcards and multiple-choice questions. Enhance your understanding with hints and explanations for each question. Pass your exam confidently!

Multiple Choice

Which element supplies caption tracks for a video?

Explanation:
Providing caption data for a video is done with the Track element. This element is placed inside the video tag and points to a separate text track file (usually WebVTT) that contains the captions or subtitles with their timing. The track element tells the browser where to find the caption text and how it should be presented, using attributes like kind (often "captions"), src (the track file), srclang (language), and label (name shown in the UI). A default attribute can auto-activate a track. For example: <video controls> <source src="movie.mp4" type="video/mp4"> <track kind="captions" src="captions_en.vtt" srclang="en" label="English" default> </video> This makes the captions available during playback, while the video element itself is just the container that plays the media and hosts the track data. The Source element supplies the video file; the Div element is just a container; the Video element hosts media and can include one or more Track elements to provide captions.

Providing caption data for a video is done with the Track element. This element is placed inside the video tag and points to a separate text track file (usually WebVTT) that contains the captions or subtitles with their timing. The track element tells the browser where to find the caption text and how it should be presented, using attributes like kind (often "captions"), src (the track file), srclang (language), and label (name shown in the UI). A default attribute can auto-activate a track.

For example:

This makes the captions available during playback, while the video element itself is just the container that plays the media and hosts the track data. The Source element supplies the video file; the Div element is just a container; the Video element hosts media and can include one or more Track elements to provide captions.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy