HTML slt;video> autoplay property

HTML video autoplay property HTML and video. Tags

The autoplay property means that videos will start playing automatically as soon as the video load in the web page is complete, see the following example:

Video elements 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 out . . .

Browser support

HTML video autoplay property HTML video autoplay property HTML video autoplay property HTML video autoplay property HTML video autoplay property

Autoplay properties are supported in all major browsers.

Note: Internet Explorer 8 and earlier versions of IE do not support the label.


Definitions and usages

The autoplay property is the boolean property.

The autoplay property specifies that the video starts playing as soon as it is ready. If this property is set, the video will play automatically.

Note: The preload property in the label is excluded from the autoplay property, and if the autoplay property was set before the video, and then the preload property is set, the preload property will be invalidated.


The difference between HTML 4.01 and HTML5

The label is a new HTML5 label.


The difference between HTML and XHTML

In XHTML, the property does not allow short writing, and the autoplay property must be defined as: .lt;video autoplay?"autoplay"."""""""


Grammar

<video autoplay>


HTML video autoplay property HTML and video. Tags