<?xml version="1.0" encoding="utf-8"?>

The <track> tag

The <track> tag Bad Practice
The <track> tag Best Practice

Subtitles or closed captions bring nothing but benefits. They allow users to watch videos in sound-sensitive environments like offices and libraries or on public transport. Plus, they increase accessibility, making video content available for users with hearing impairments.

So how can we add subtitles to videos? The self-closing <track> tag specifies subtitles, caption files, or other files containing text that should accompany the playing media. For this tag, developers use files of a WebVTT format (.vtt files).

Improve your UX & Product skills with interactive courses that actually work