HTML AUDIO Tag || AUDIO Tag in HTML
×

HTML AUDIO <audio> Tag

2567

The AUDIO <audio> tag was introduced in HTML 5. The <audio> element is used to embed audio content like sounds, such as music or other audio streams in an HTML document.

The <audio> tag is written as <audio> </audio>. The audio tag used some attribute like autoplay, controls, loop, muted, preload and src.

Currently, HTML5 supported 3 type file formats for the <audio> element:

  • MP3
  • WAV
  • OGG

Note:

Any text inside the between <audio> and </audio> will be displayed in browsers that do not support the <audio> tag.

Program:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title> HTML Audio Tag </title>
</head>
<body>

<h1> The audio tag </h1>
 <audio controls>
  <source src="audio.ogg" type="audio/ogg">
  <source src="audio.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
 </audio>
</body>
</html>


Best WordPress Hosting


Share:


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price



Leave a Reply


Comments
    Waiting for your comments