Content · Web Development · HTML

HTML Media Captions, Subtitles, and Transcripts

Media Captions, Subtitles, and Transcripts: Try moving through the elements with a keyboard. The labels and relationships matter even when no extra styling has been added. Includes a practical HTML example and an explanation.

1 views Published Oct 19, 2026 Updated Oct 19, 2026 Admin

A webpage should make sense even when someone cannot see its colors, pictures, or layout.

What You Need to Know


Captions show spoken words and key sounds at the right time. Subtitles usually translate speech into another language; transcripts present it as readable text. A video may need more than one of these.

Try the Example


Take a look at the example. We’ll explain the important lines right below it.

<video controls width="480">
    <source src="media/lesson.mp4" type="video/mp4">
    <track src="media/captions-en.vtt" kind="captions" srclang="en" label="English" default>
    Your browser cannot play this video.
</video>

Let’s Read the Code


  • <video>: The video element creates a video player and can include alternative formats.
  • <source>: A source points to a media file or image choice with a type or other condition.
  • controls: Controls asks the browser to provide its native audio or video player controls.
  • width: Width gives a preferred or intrinsic media width, depending on the element.

Read the named elements and attributes together. They explain how the browser connects this feature to the rest of the page.

What Happens in the Browser?


Try this with Tab and Shift+Tab. If you can, inspect the accessibility tree too; appearance alone does not tell the whole story.

Try a different way of reading. Read only the headings and labels, or navigate through links without looking at the rest of the page. If the page still makes sense, the underlying HTML is probably doing an important part of its job.

Your Turn


Use Tab and Shift+Tab to visit the controls, then read their labels aloud. Is the purpose of each one clear?

Common Beginner Mistakes


  • Expecting the page to run scripted behavior when the required JavaScript is missing.
  • Check the same result using both the browser and a keyboard, not only by looking at the screen.

Key Takeaways


  • Captions show spoken words and key sounds at the right time.
  • <video>: The video element creates a video player and can include alternative formats.
  • If the resource cannot load, users still need enough text to understand what was meant to be there.
Share this resourceSend this page to someone who may find it useful.