Audio element

  • The <audio> element is useful for embedding an audio player into a Web page. It is dedicated for streamed audio. It is very similar to the <video> element, both in its use and in its API.
  • The “Web Audio API” is designed for musical applications and for adding sound effects to games. This pure JavaScript API supports manipulation of sound samples (loops, etc.), music synthesis and sound generation (oscillators, etc.). It also comes with a set of predefined sound processing modules (reverb, delay, etc.).


  1. <html lang=”en”>
  2. <body>
  3.   <audio controls=“controls”>
  4.       <source src=;
  5.               type=“audio/ogg” />
  6.       <source src=;
  7.               type=“audio/mp3” />
  8.       Your browser does not support the audio element.
  9.       Download the audio/video in
  10.      <a href=””>OGG</a>
  11.      or <ahref=””>MP3</a>
  12.      format.
  13. </audio>
  14. </body>
  15. </html>



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s