English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
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 ‹/›
IEFirefoxOperaChromeSafari
Currently, all mainstream browsers support the preload attribute, except for Internet Explorer.
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.
preload attribute is HTML 5 New attribute in <audio> tag is HTML5New tag.
<audio preload="auto|metadata|none">
Value | Description |
---|---|
load | Specifies whether the audio is preloaded. Possible values:
|