HTML video autoplay attribute
Examples
Set to automatically play video elements:
<video controls autoplay>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
您的浏览器不支持 video 标签。
</video>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
您的浏览器不支持 video 标签。
</video>
try it"
Browser Support
All major browsers support autoplay attribute.
Note: Internet Explorer 8 and earlier versions of IE do not support the <video> tag.
Definition and Usage
autoplay attribute is a boolean (Boolean) property.
autoplay attribute specifies Once the video is ready to start playing immediately. If this attribute is set, the video will play automatically.
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, autoplay attribute must be defined as: <video autoplay = "autoplay">.
grammar
<video autoplay>
HTML <video> tag