<audio> Element Examples
Here is an audio example with a src
in the opening tag
Here is an audio example with multiple <source> children
Here is an audio example that loops
Here is an audio example that enables autoplay
[NOTE: no longer works in Google Chrome 67+]
(Don't do this! It is very bad practice to play sounds without the user's
action or consent.)
If you don't set the controls
attribute, the <audio>
tag will load, but it won't be visible, and you can't control it without
Javascript.
The audio tag is below, but without controls, there's nothing to see.