Subtitles
How to Add Subtitles to HTML5 Video (Step-by-Step)
Published: July 3, 2025 · 4 min read
Adding subtitles to your website video improves accessibility, boosts SEO, and reaches international audiences. HTML5 video supports subtitles natively, but only in WebVTT format.
Why HTML5 video needs VTT
The HTML5 <track> element requires WebVTT format. SRT files will not work directly — you need to convert them first.
Step 1: Convert your SRT file
Use a browser-based converter to transform SRT to VTT. No software installation needed.
Step 2: Add the track element
Add a <track> element inside your <video> tag pointing to the VTT file:
<video controls>
<source src="video.mp4" type="video/mp4">
<track kind="subtitles" src="subtitles.vtt" srclang="en" label="English">
</video>
Common mistakes
- Forgetting the
srclangattribute — browsers need it to identify the language. - Using the wrong file path to the VTT file.
- Using
kind="captions"instead ofkind="subtitles"— they have different semantics. - Not setting the default track with the
defaultattribute.