HTML <video> autoplayProperty

HTML <video> Tag

Example

video element set to autoplay:

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

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the autoplay attribute.

Note:Internet Explorer 8 and earlier IE 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 play automatically.


Differences between HTML 4.01 and HTML5

The <video> tag is a new HTML5 tag.


Difference between HTML and XHTML

In XHTML, attribute minimization is not allowed, and the autoplay attribute must be defined as: <video autoplay="autoplay">.


Syntax

<video autoplay>


HTML <video> Tagother extensions