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

How to use html track tag

silencement
Release: 2019-05-27 10:15:09
Original
3174 people have browsed it

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>
Copy after login

Between HTML 4.01 and HTML 5 Difference

The tag is a new tag in HTML5.

Global attributes

The tag supports global attributes in HTML.

Event Attributes

The 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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template