Home  >  Article  >  Web Front-end  >  How to use html track tag

How to use html track tag

silencement
silencementOriginal
2019-05-27 09:59:253141browse

How to use html track tag

Definition and Usage

The track> tag specifies an external text track for media such as a video element.

is used to specify subtitle files or other files containing text that are visible when the media is played.

Example

Play a video with subtitles:

<video width="320" height="240" controls="controls">
  <source src="forrest_gump.mp4" type="video/mp4" />
  <source src="forrest_gump.ogg" type="video/ogg" />
  <track kind="subtitles" src="subs_chi.srt" srclang="zh" label="Chinese">
  <track kind="subtitles" src="subs_eng.srt" srclang="en" label="English">
</video>

Between HTML 4.01 and HTML 5 Difference

The9bf7cbf2c39baa37076a22499de2f6ed tag is a new tag in HTML5.

Global attributes

The9bf7cbf2c39baa37076a22499de2f6ed tag supports global attributes in HTML.

Event Attributes

The9bf7cbf2c39baa37076a22499de2f6ed tag supports event attributes in HTML.

The above is the detailed content of How to use html track tag. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to use html embed tagNext article:How to use html embed tag