HTML5 BASICS:HTML5 Audio

Webpages contain audio only after the introduction of HTML5.Like in video here also an element exist <audio>. Audio is a special feature of HTML5.It represents a sound or audio,for this purpose <audio> tag is used. There are some attributes that support audio tags like global attribute,autoplay.

How It Works?

There is one major attribute present known as control,this add some properties to audio,such as play,volume etc The text details between audio tags sould be displayed in the browser.

The <audio> Tag

In order to include an audio file with in an HTML page we use <audio> tag.



Attributes

Controls:It s a boolean attribute and this attribute provide some additonal features such as paly,pause etc.
Autoplay:This attribute provides the automatic play feature for users with out any other action from user side.
src:It describes the url or path of the audio with in our document
Preload:This attribute is like control attribute. It provides some features like do not buffer audio file automatically,only buffer the metadata of audio file.




Jesna N Scaria

Articles : 32

I am a Software Developer at Leedhar Technologies
India India