Embed Audio in Web Pages using HTML5



Use the <audio> tag to embed audio in a web page in HTML5. You can try to run the following code to implement <audio> tag −

Example

<!DOCTYPE html>
<html>
   <head>
      <title>HTML audio Tag</title>
   </head>
   <body>
      <p>Click on Play button...</p>
      <p>(Song: Kalimba which is provided as a Sample Music in Windows)</p>
      <audio controls>
         <source src = "/html/Kalimba.mp3" type = "audio/mpeg">
      </audio>
   </body>
</html>
Updated on: 2020-03-03T05:57:56+05:30

376 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements