English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML: <audio> preload attribute

This article introduces the usage of the <audio> preload attribute, online examples demonstrating how to use the <audio> preload attribute, browser compatibility, syntax definition, and detailed information about its attribute values.

HTML <audio> tag

Online Examples

Set the preload attribute for audio elements:

<!DOCTYPE html>
<html>
<title>HTML:<audio> muted attribute - 基础教程网 oldtoolbag.com</title>
<body>
<audio controls preload="none">
  <source src="horse.ogg" type="audio/ogg">
  <source src="horse.mp3" type="audio/mpeg">
  Your browser does not support the audio tag.
</audio>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

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

Definition and usage

The preload attribute specifies whether the audio is loaded after the page is loaded.

The preload attribute allows the author to provide the browser with information about/She thinks it will bring the best user experience tips. In some cases, this attribute can be ignored.
Note: If the autoplay feature is set, the preload attribute will be ignored.

HTML 4.01 and HTML 5 differences between

preload attribute is HTML 5 New attribute in <audio> tag is HTML5New tag.

Syntax

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

Attribute value

ValueDescription
load

Specifies whether the audio is preloaded.

Possible values:

  • auto - The entire audio is loaded when the page is loaded

  • meta - Only metadata is loaded when the page is loaded

  • none - Audio does not load when the page is loaded

HTML <audio> tag