"."/> ".">
Home >Web Front-end >Front-end Q&A >What does preload mean in html5
In HTML5, preload means "preloading" and is used to specify whether to load audio or video after the page is loaded. If the autoplay attribute is set, this attribute will be ignored, and the preload attribute is in HTML5 The new attribute of , the syntax is "
".
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
The preload attribute specifies whether to load audio after the page is loaded.
If the autoplay attribute is set, this attribute is ignored.
The preload attribute is new in HTML 5. The
The syntax is:
<audio preload="auto|metadata|none">
<video preload="auto|metadata|none">
Specifies whether to preload audio.
Possible values:
auto - Load the entire audio when the page loads
meta - When the page loads Only load metadata
none - Do not load audio when the page loads
Example is as follows:
Does not load
<video width="320" height="240" controls preload="none"> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> 您的浏览器不支持 video 标签。 </video>
Output result:
Loads after the page is loaded
<video width="320" height="240" controls preload="auto"> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> 您的浏览器不支持 video 标签。 </video>
Output result:
(Learning video sharing: css video tutorial, html video tutorial)
The above is the detailed content of What does preload mean in html5. For more information, please follow other related articles on the PHP Chinese website!