English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <video> controls attribute

Usage of the <video> controls attribute, online examples, browser compatibility, syntax definition, and detailed information about its attribute values.

 HTML <video> tag

Online Example

The <video> element with the browser's default controls:

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>
Test and see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the controls attribute.

Note: Internet Explorer 8 and earlier IE versions do not support the <video> tag.

Definition and Usage

The controls attribute is a boolean (boolean) attribute.

The controls attribute specifies that the browser should provide playback controls for the video.

If this attribute is set, it specifies that there is no script control set by the author.

Browser controls should include:

  • play

  • pause

  • position

  • volume

  • fullscreen toggle

  • subtitles (if available)

  • audio track (if available)

HTML 4.01 with HTML5differences

<video> tag is HTML5 New tags.

Differences between HTML and XHTML

In XHTML, attributes are not allowed to be abbreviated, the controls attribute must be defined as: <video controls="controls">.

Syntax

<video controls>
 HTML <video> tag