audio tag, or Embed Audio element, embeds sound content into the document, using one or more
src attributes to define the audio source file. The browser will choose the first source that it supports.
src attribute in a similar manner as the
img tag, the path to the media file to embed is defined. Additional optional attributes can specify such things as automatically playing and looping the media. Any content inside the
audio tag is displayed as a fallback for lack of browser support.
<audio controls autoplay src="audiofile.mp3"> <p>Your browser does not support audio files.</p> </audio>
If included, the audio will immediately begin playing as soon as enough of the file is loaded. This is a Boolean value.
When present, the browser renders controls for audio playback, such as volume, pause/resume, etc.
When specified, determines what is shown when the
controls attribute is present. Allowed values are
When specified, the audio will replay from the beginning every time it finishes.
When specified, the audio output will be muted.
This tells the browser how the audio should be loaded when the page loads. Allowed values are
User-submitted codepen.io examples of
Submit a codepen.io link that demonstrates
Help @reference spread the word by sharing this article on Twitter...Tweet This