How do we embed audio in web pages in HTML5?

HTMLWeb DevelopmentFront End Technology

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>
raja
Published on 13-Mar-2018 17:47:19
Advertisements