Horje

Example of HTML Audio

To play an audio file in HTML, use the <audio> element:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<audio controls>
  <source src="https://www.w3schools.com/html/horse.ogg" type="audio/ogg">
  <source src="https://www.w3schools.com/html/horse.ogg" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

</body>
</html>

Output should be:

Example of HTML Audio



Single Articles
Example of HTML AudioHTML Audio


Related Articles
What is HTML Audio HTML Audio
How It Works HTML Audio HTML Audio
How to set HTML <audio> Autoplay HTML Audio
How to Add muted after autoplay HTML Audio
What are the HTML Audio Formats HTML Audio
What are the HTML Audio - Media Types HTML Audio
What are the HTML Audio - Methods, Properties, and Events HTML Audio

Type:
Html
Category:
Web Tutorial
Sub Category:
HTML Audio
Uploaded by:
Admin