The audio element (<audio>) is used for playing audio files and may display a minimal media player user interface.
Overview TableExtensive documentation on manipulating the element may be found on the HTMLAudioElement page.
HTML Attributesautoplay
= “autoplay” or “” (empty string) or emptypreload
= “none” or “metadata” or “auto” or “” (empty string) or emptycontrols
= “controls” or “” (empty string) or emptyloop
= “loop” or “” (empty string) or emptymediagroup
= stringsrc
= URL potentially surrounded by spacesAuthors should ensure that the information and user interface components must be presentable to users in ways they can perceive (WCAG 2.0 - Principle 1: Perceivable). This includes providing alternatives for time-based media Guideline 1.2.
Formats and CodecsThe specification does not require a specific audio codec to be supported by all user agents. Using both Ogg/Vorbis and MP4/AAC seems to cover most user-agents, however. See the Audio format support on Wikipedia.
Examplesplay a mp3 on webpage
<audio controls src="http://freedownloads.last.fm/download/533190714/she%2Bso%2Bfly.mp3" type="audio/mp3">
</audio>
Related specifications
Mozilla Developer Network : Article
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4