Horje

How to add An <audio> element with browser default controls

The audio controls attribute. Click on the play button to play a sound.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The audio controls attribute</h1>

<p>Click on the play button to play a sound:</p>

<audio controls>
  <source src="https://freetestdata.com/wp-content/uploads/2021/09/Free_Test_Data_100KB_MP3.mp3" type="audio/ogg">
  <source src="https://freetestdata.com/wp-content/uploads/2021/09/Free_Test_Data_100KB_MP3.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>

</body>
</html>
How to add An <audio> element with browser default controls




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin