Autoplay video HTML

HTML | autoplay Attribute

The HTML autoplay Attribute is used to specify that the audio/video should automatically start playing when web page is loaded. It is a Boolean attribute.

Syntax:

Attention reader! Dont stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.

Uses It can be used with

Example 1: Here the autoplay attribute is used with the






HTML video autoplay Attribute

GeeksforGeeks

HTML video autoplay Attribute

"https://media.geeksforgeeks.org/wp-content/uploads/20190616234019/Canvas.move_.mp4"
type="video/mp4">
"https://media.geeksforgeeks.org/wp-content/uploads/20190616234019/Canvas.move_.ogg"
type="video/ogg">

Output:

Autoplay video HTML

Example 2: Here the autoplay attribute is used with the




</div> <div class="line number6 index5 alt1"> HTML audio autoplay Attribute </div> <div class="line number7 index6 alt2">

GeeksforGeeks

HTML audio autoplay Attribute

"https://media.geeksforgeeks.org/wp-content/uploads/20190531165842/Recording1514.ogg"
type="audio/ogg">
"https://media.geeksforgeeks.org/wp-content/uploads/20190531165842/Recording1514.mp3"
type=" audio/mpeg ">

Output:

Autoplay video HTML

Supported Browsers: The browser supported by HTML autoplay attribute are listed below:

  • Google Chrome 4.0
  • Internet Explorer 9.0
  • Firefox 3.5
  • Safari 4.0
  • Opera 10.5



Article Tags :
HTML
Web Technologies
HTML-Attributes
Practice Tags :
HTML