audio autoplay Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:audio

Description

The autoplay attribute is a boolean attribute to set if the audio will automatically start playing as soon as it can do so without stopping.

An audio file that will automatically start playing:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<audio controls autoplay>
  <source src="your.ogg" type="audio/ogg">
  <source src="your.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio><!--  w ww .jav  a 2 s .  co  m-->

</body>
</html>

Related Tutorials