Core HTML

The Audio Tag

The audio tag was added to HTML in HTML 5 to add support for more media types. Below, there is a simple demonstration of an audio tag.

PlayAudio.html

<!DOCTYPE html>
<html>
  <head>
    <title>XoaX.net - Play an MP3 audio file</title>
  </head>
  <body>
    <audio controls>
      <source src="XoaxAmigaMusic1.mp3" type="audio/mpeg">
      The audio tag is not supported in your browser.
    </audio>
  </body>
</html>
 

Output

XoaX.net - Play an MP3 audio file
 
 

© 2007–2024 XoaX.net LLC. All rights reserved.