HTML <audio> preloadAttributes

HTML audio 标签参考手册HTML <audio> Tag

Examples

A preload element set to preload:

<audio controls preload="none">
  <source src="horse.ogg.html" type="audio/ogg">
  <source src="horse.mp3.html" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

Try it Yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Currently all mainstream browsers support the preload attribute, except Internet Explorer.


Definition and Usage

The preload attribute specifies whether the audio should be loaded after the page loads.

If the autoplay attribute is set, this attribute is ignored.


Differences between HTML 4.01 and HTML 5

The preload attribute is a new attribute in HTML 5. The <audio> tag is a new HTML5 tag.


Syntax

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

Attribute Values

Value Description
load

Specifies whether to preload the audio.

Possible values:

  • auto - Loads the entire audio after the page loads
  • meta - Loads only the metadata after the page loads
  • none - Does not load the audio after the page loads


HTML audio 标签参考手册HTML <audio> Tag

Other Extensions