MOCKSTACKS
EN
Questions And Answers

More Tutorials









HTML Audio

The HTML <audio> element is used to play a audio on a web page.

The <audio> tag is used to embed sound content in a document, such as music or other audio streams. The <audio> tag contains one or more <source> tags with different audio sources. The browser will choose the first source it supports




<audio controls>
    <source src="horse.ogg" type="audio/ogg">         
</audio>

HTML <audio> Autoplay

To start a audio automatically, use the autoplay attribute:



<audio autoplay>
    <source src="horse.ogg" type="audio/ogg">         
</audio>

HTML <video> Muted

To start a audio automatically,with muted audio muted attribute is used :



<audio autoplay muted>
    <source src="horse.ogg" type="audio/ogg">         
</audio>



Conclusion

In this page (written and validated by ) you learned about HTML Audio . What's Next? If you are interested in completing HTML tutorial, your next topic will be learning about: HTML Plug-in.



Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue: mockstacks@gmail.com.


Share On:


Mockstacks was launched to help beginners learn programming languages; the site is optimized with no Ads as, Ads might slow down the performance. We also don't track any personal information; we also don't collect any kind of data unless the user provided us a corrected information. Almost all examples have been tested. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. By using Mockstacks.com, you agree to have read and accepted our terms of use, cookies and privacy policy.