"."/> ".">

Home  >  Article  >  Web Front-end  >  What does preload mean in html5

What does preload mean in html5

WBOY
WBOYOriginal
2022-09-02 16:28:554531browse

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

What does preload mean in html5

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

What does preload mean in html5

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:

What does preload mean in html5

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:

What does preload mean in html5

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn