In this section, you will see the use and implementation of audio tag.
In this section, you will see the use and implementation of audio tag.In this section, you will see the use and implementation of audio tag in HTML5. The <audio> tag is used to add audio in web page or HTML page. When audio tag is not used, browser asks for plugin or script for playing audio or music. It is a paired tag.
The Content present in audio tag will be displayed only when browser does not support.
Attribute is used for providing more information to the browser about the tag. There are following attributes in audio tag:
1-autoplay
2-autobuffer
3-controls
4-loop
5-preload
6-src
Declaration syntax of audio tag in HTML5.
<audio src="URL"></audio> |
The declaration of audio is case_ insensitive.
<!DOCTYPE html > <html > <head> <title>Audio Tag </title> </head> <body> <p><b>Example of audio tag in HTML5.</b></p> <audio src="a1.mp3" controls="controls" > Browser does not support audio tag. </audio> </body> </html> |
The audio tag is only available in HTML5. It is not available in HTML4.01.