html tutorial - autoplay Attribute in HTML - html5 - html code - html form
- autoplay attribute is a Boolean attribute.
- The audio and video files are automatically start playing as soon as possible while the HTML page load.
Syntax for autoplay attribute in HTML:
Differences between HTML 4.01 and HTML5 for autoplay attribute:
- HTML4 does not support <audio> and <video> tag.
- <audio> and <video> tags are new in HTML5.
Sample coding for autoplay attribute in HTML:
Code Explanation for autoplay attribute in HTML:
- autoplay attribute is used to play the audio file automatically without user interaction.
Output for autoplay attribute in HTML:
- The output shows that the audio file played automatically while the page load.
Browser Support for autoplay attribute in HTML: