HTML preload Attribute

❮ HTML Attributes

Example

<audio controls preload="auto">
	<source src="audio/demo.mp3" type="audio/mpeg">
	<source src="audio/demo.ogg" type="audio/ogg">
	Your browser does not support the audio tag.
</audio>

Meaning

The preload attribute specifies what the author thinks the audio/video should be loaded when the page loads.




Standard Syntax

<element preload="auto|metadata|none">



Browser Support




Status




Applies to:

The preload attribute can be used on the following element:

Element Attribute
<audio> preload
<video> preload






Attribute Values

Value Description
auto The browser should load the entire audio/video file when the page loads.
metadata The browser should load only metadata when the page loads
none The browser should NOT load the audio/video file when the page loads



More Examples

Example

<video width="340" height="260" controls preload>
	<source src="demo/video.mp4" type="video/mp4">
	<source src="demo/video.webm" type="video/webm">
	Your browser does not support the video tag.
</video>
❮ HTML Attributes