"> " />
Easy Tutorial
❮ Att Command Label Att Ins Datetime ❯

HTML <video> autoplay Attribute

HTML <video> Tag

Example

A video element set to autoplay:

&lt;video controls autoplay>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>

Browser Support

All major browsers support the autoplay attribute.

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


Definition and Usage

The autoplay attribute is a boolean attribute.

The autoplay attribute specifies that the video will start playing as soon as it is ready. If this attribute is set, the video will autoplay.


Differences Between HTML 4.01 and HTML5

The <video> tag is new in HTML5.


Differences Between HTML and XHTML

In XHTML, attributes cannot be minimized, so the autoplay attribute must be defined as: <video autoplay="autoplay">.


Syntax

❮ Att Command Label Att Ins Datetime ❯