Skip to content
Related Articles

Related Articles

How to autoplay audio on chrome ?

Improve Article
Save Article
  • Last Updated : 05 Jun, 2020
Improve Article
Save Article

Here we will learn how to auto-play audio on selected devices in web pages. To load the audio in the web page, we use the <audio> tag.

There are some attribute of this “audio” tag:

  • controls: This feature is used for audio be visible the controls on the web pages. After using this feature, we can pause or play music, high or low music.
  • autoplay: This feature is used for audio to start audio clip when page load. If you run a web page, the audio file will load and just the audio will play automatically.


<!DOCTYPE html> 
        HTML audio autoplay Attribute 
<body style="text-align: center"
    <h1 style="color: green"
    <h2>HTML audio autoplay Attribute</h2
    <audio controls autoplay> 
        <source src="GFG.ogg" type="audio/ogg"
        <source src="GFG.mp3" type="audio/mpeg"


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!