HTML kind Attribute

Description

The kind attribute in HTML is used to specify the type of track for <track> elements, which are used to specify text tracks for <audio> or <video> elements. These tracks are generally used for providing additional information such as subtitles, captions, descriptions, chapters, or metadata. The kind attribute helps the browser understand the purpose of the track so it can be handled appropriately, enhancing the multimedia experience for users by making it accessible and navigable. Depending on the value assigned to the kind attribute, different types of tracks can be defined to suit various user needs, such as supporting multiple languages or providing descriptions for the visually impaired.

Syntax

<track src="URL" kind="subtitles | captions | descriptions | chapters | metadata">

Values

  • subtitlesIndicates that the track provides subtitles, which are a transcription or translation of the dialogue, sound effects, relevant musical cues, and other relevant audio information when it is important for understanding and following the video. Subtitles are intended for viewers who can hear the audio but need the dialogue and sound cues in text form.
  • captionsSpecifies that the track contains captions, which are intended for viewers who are deaf or hard of hearing. Captions are similar to subtitles but also include descriptions of sound effects and other audio cues to provide context.
  • descriptionsIndicates that the track contains descriptions of the video content. These are text descriptions of the video scene and action, intended for users who are visually impaired and cannot see the video content.
  • chaptersDesignates that the track defines chapters in the media, allowing users to navigate the media resource more easily. Chapters can be used to jump to specific sections of the video or audio.
  • metadataSpecifies that the track contains metadata for the video or audio. This is data about the contents of the media, such as information about how the media was created, its author, or related data that is not directly displayed to the user.

Applies To

The kind attribute can be used on the following html elements.

Example

<video controls>
<source src="images/earth.mp4" type="video/mp4">
<track kind="subtitles" src="movie_en.vtt" srclang="en" label="English subtitles">
<track kind="captions" src="movie_es.vtt" srclang="es" label="Spanish captions">
</video>

Browser Support

The following table will show you the current browser support for the HTML kind Attribute.

Desktop
Edge Chrome Firefox Opera Safari
12233112.16
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
25311461.54.4

Last updated by CSSPortal on: 28th March 2024