Latest web development tutorials

HTML video controls property

HTML video tag Reference Manual HTML <video> tag

Examples

With the browser's default controls <video> element:

<video controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
您的浏览器不支持 video 标签。
</video>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support controls property.

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


Definition and Usage

controls attribute is a boolean (Boolean) property.

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

If you set the property, there is no prescribed script control OF settings.

Browser Controls should include:

  • Broadcast
  • time out
  • Locate
  • volume
  • Full-screen toggle
  • Subtitles (if available)
  • Track (if available)

Differences between HTML 4.01 and HTML5

<Video> tag is the new HTML5 tags.


The difference between HTML and XHTML

In XHTML, the property is not allowed shorthand, controls property must be defined as: <video controls = "controls">.


grammar

<video controls>


HTML video tag Reference Manual HTML <video> tag