HTML <video> autoplay attribute

Definition and Usage

autoplay The attribute is a boolean attribute.

When this attribute is present, the video will start playing automatically.

Note:In most cases, Chromium browsers do not allow autoplay. However, silent autoplay is always allowed.

Please add it after autoplay muted, so that your video file starts playing automatically (but muted).

Example

The video will start playing automatically:

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

Try It Yourself

Syntax

<video autoplay>

Browser Support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
4.0 9.0 3.5 3.1 11.5