HTML kind Attribute

Beginner
⏱️ 6 min read
📚 Updated: Jun 2026
🎯 3 Examples
Media & Accessibility

Introduction

The kind attribute is used on the <track> element to tell the browser what type of text track you are providing—subtitles, captions, audio descriptions, chapter markers, or metadata. Text tracks live inside <video> or <audio> and point to a WebVTT (or similar) file via the src attribute. They are essential for accessible, multilingual media.

What You’ll Learn

01

<track> Element

Where kind belongs.

02

Five Values

subtitles to metadata.

03

Captions vs Subs

Accessibility roles.

04

WebVTT Files

src + srclang + label.

05

default Track

Pre-selected option.

06

JavaScript kind

Change at runtime.

Purpose of kind

The primary purpose of the kind attribute is to classify a text track so the browser and assistive technologies know how to present it. A track with kind="captions" is treated as closed captions; kind="descriptions" provides spoken narration of visual action for blind users; kind="chapters" supplies navigation markers; and kind="metadata" exposes data cues that scripts can read without showing on screen.

Without a meaningful kind, browsers default to subtitles. Choosing the correct value helps users pick the right option from the media player’s captions menu and ensures accessibility guidelines are met.

⚠️
Not for <source> elements

The <source> element picks alternate media files (MP4, WebM) using src and type—it has no kind attribute. Put kind on <track> only.

📝 Syntax

Add one or more <track> elements as children of <video> or <audio>:

kind.html
<video controls>
  <source src="movie.mp4" type="video/mp4">
  <track
    kind="subtitles"
    src="movie-en.vtt"
    srclang="en"
    label="English"
    default>
</video>

Syntax Rules

  • Valid only on <track> elements inside <video> or <audio>.
  • Always pair kind with src (WebVTT URL), srclang (BCP 47 language), and label (user-visible name).
  • Use the default boolean attribute on one track to pre-select it when the media loads.
  • Default value if omitted: subtitles.
  • Multiple tracks may share the same kind but differ in srclang (e.g. English and Spanish subtitles).
  • Do not put kind on <source>—that element describes media containers, not text overlays.

💎 Values

The kind attribute accepts one of five keyword values defined in the HTML specification:

  • subtitles — Translation or transcription of dialogue. Assumes the viewer can hear non-speech audio. Default when kind is omitted.
  • captions — Transcription of dialogue and relevant sound effects (e.g. [door slams]). For deaf and hard-of-hearing viewers.
  • descriptions — Text describing visual content, often read aloud by screen readers or synthesized speech as an audio description track.
  • chapters — Chapter titles or section markers the user can jump to in supported players.
  • metadata — Cues for scripts or APIs; not intended for on-screen display to end users.

In JavaScript, read or set the property on the track element:

kind-js.html
document.querySelector("track").kind = "captions";

⚡ Quick Reference

Use Casekind ValueNotes
Translate dialoguesubtitlesDefault; assumes hearing audience
Full accessibility textcaptionsIncludes sound effects
Describe visualsdescriptionsAudio description content
Chapter navigationchaptersJump points in timeline
Script-readable datametadataHidden from typical UI
Pre-selected trackAny + defaultOne track per media element

Applicable Elements

Element / ContextSupported?Notes
<track> in <video>YesPrimary use case
<track> in <audio>YesLyrics, transcripts, chapters
<source>NoUse type for MIME type
<video> or <audio> directlyNokind belongs on child <track>

subtitles vs captions

Featuresubtitlescaptions
Target audienceViewers who hear audioDeaf / hard-of-hearing viewers
DialogueYesYes
Sound effectsUsually omittedIncluded (e.g. [applause])
Typical useForeign-language filmsBroadcast TV, accessibility law
Default if kind omittedYes (subtitles)No—must set explicitly

Examples Gallery

English subtitles on a video, multiple track kinds for accessibility, and updating kind with JavaScript.

👀 Live Preview

A minimal video with an embedded WebVTT subtitles track (open the CC menu in the player if needed):

The <track> uses kind="subtitles" and a data-URI src for this inline demo. In production, host .vtt files on your server.

Example — Subtitles on a Video

Let’s look at a basic example of how to use the kind attribute on a <track> element:

kind.html
<video controls>
  <source src="movie.mp4" type="video/mp4">
  <track
    kind="subtitles"
    src="movie-en.vtt"
    srclang="en"
    label="English"
    default>
  Your browser does not support the video tag.
</video>
Try It Yourself

How It Works

The <source> element supplies the video file. The sibling <track> supplies timed text cues. The kind value tells the browser this track is subtitles—not full captions or chapter data.

Example — Multiple Track Kinds

Provide captions and audio descriptions alongside subtitles for the same video:

kind-multiple.html
<video controls>
  <source src="lecture.mp4" type="video/mp4">
  <track kind="captions" src="lecture-en-cc.vtt" srclang="en" label="English CC" default>
  <track kind="subtitles" src="lecture-es.vtt" srclang="es" label="Español">
  <track kind="descriptions" src="lecture-ad.vtt" srclang="en" label="Audio description">
  <track kind="chapters" src="lecture-chapters.vtt" srclang="en" label="Chapters">
</video>
Try It Yourself

How It Works

Each <track> has its own kind, src, and language. The browser groups them by purpose so captions and subtitles appear in the text track menu while chapter tracks may appear in a separate navigation UI.

Dynamic Values with JavaScript

Change the track classification at runtime—useful when reusing one VTT file for a different role after user preference:

dynamic-kind.html
<video id="myVideo" controls>
  <source src="clip.mp4" type="video/mp4">
  <track id="dynamicTrack" kind="subtitles" src="clip.vtt" srclang="en" label="English">
</video>

<script>
  document.getElementById("dynamicTrack").kind = "descriptions";
</script>
Try It Yourself

How It Works

The DOM property kind on HTMLTrackElement mirrors the content attribute. Changing it reclassifies how the browser exposes the track. For production, set the correct kind in HTML rather than patching it in script.

♿ Accessibility

  • Use kind="captions" for deaf users — Include non-speech sounds, not just dialogue.
  • Offer descriptions tracks — Narrate important visual action for blind viewers when video conveys information only on screen.
  • Write clear label text — Users choose tracks from the menu by label; “English CC” is clearer than “Track 1”.
  • Set srclang accurately — Assistive tech and browsers use BCP 47 language tags (e.g. en, es).
  • Mark one track default — Pre-enable the most accessible option (often captions in the viewer’s language).
  • Do not rely on burnt-in subtitles in the video file alone — Separate WebVTT tracks are searchable, toggleable, and translatable.

🧠 How kind Works

1

Author adds track with kind

Inside video or audio.

Markup
2

Browser fetches WebVTT src

Timed text cues loaded.

Network
3

kind selects presentation role

Captions, subs, chapters, etc.

Classification
=

User sees accessible text

Tracks appear in the player menu.

Browser Support

The kind attribute on <track> is supported in all modern browsers alongside the HTML5 media elements. Older browsers without <track> support ignore text tracks entirely—provide transcripts on the page as a fallback.

HTML5 · Widely supported

Text tracks in modern browsers

Chrome, Firefox, Safari, and Edge render WebVTT subtitles and captions from <track kind>.

97% Browser support
Google Chrome Fully supported
Full support
Mozilla Firefox Fully supported
Full support
Apple Safari Fully supported
Full support
Microsoft Edge Fully supported
Full support
Internet Explorer IE 10+
Partial
Opera Fully supported
Full support
kind on <track> 97% supported

Bottom line: Use WebVTT tracks with correct kind values; offer a page-level transcript for maximum accessibility.

💡 Best Practices

✅ Do

  • Put kind on <track>, not <source>
  • Provide captions for accessibility compliance
  • Host valid WebVTT files and test cue timing
  • Set meaningful label and accurate srclang
  • Use default on the track most users should see first

❌ Don’t

  • Confuse subtitles with captions for deaf audiences
  • Omit src or use non-WebVTT formats without fallbacks
  • Mark every track default
  • Rely on auto-generated captions without human review
  • Forget a text transcript link outside the player

Conclusion

The kind attribute is a valuable tool in HTML for classifying text tracks on <video> and <audio> media. It tells browsers and users whether a track provides subtitles, captions, descriptions, chapters, or metadata.

By choosing the correct kind, pairing it with WebVTT files, and writing clear labels, you make multimedia content accessible to more people and easier to navigate across languages and abilities.

Key Takeaways

Knowledge Unlocked

Five truths every developer should know about kind

Bookmark these before adding captions to video.

5
Core concepts
📝 02

Five values

subs to metadata

Syntax
03

Captions ≠ subs

Sound effects matter

A11y
📄 04

WebVTT src

Timed cue files

Files
🌐 05

srclang + label

User-facing names

i18n

❓ Frequently Asked Questions

The kind attribute applies to <track> elements inside <video> or <audio>. It does not belong on <source> elements.
subtitles, captions, descriptions, chapters, and metadata. If omitted, browsers treat the track as subtitles.
Subtitles translate dialogue for viewers who can hear the audio. Captions include dialogue plus non-speech sounds for deaf and hard-of-hearing viewers.
WebVTT (.vtt) is the standard format. The file contains timed text cues the browser displays according to the track kind.
Yes. Set trackElement.kind = "captions" on the HTMLTrackElement. Prefer setting the correct value in HTML for clarity and SEO.
No. Only one track per media element should have the default attribute. That track loads automatically when playback starts.

Make your videos accessible with text tracks

Practice kind on <track> elements and compare subtitles, captions, and descriptions in the Try It editor.

Try subtitles track example →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful