SOP. 5/CHP 1 IT 12TH COMMERCE

 Question . 5

Create a webpage named audio.html to set an audio file in web page with controls such that it uses html 5 elements. The audio file must play as soon as the webpage loads in browser and it will start over again, every time when it is completed.

Create another webpage named audio1.html which provides multiple source file formats for the same audio file that plays a sound automatically with controls. The browser should display the message with appropriate attribute when audio file is not supported by browser. The code must incorporate the list of sound files formats (like wav, MP3 or ogg etc).

Coding for the following question:-

Audio 1 

<html>

<head> 

<title>audio controls</title>

</head>

<body>

<audio controls >

<source src="song.mp3" type="audio/mp3">

</audio>

</body>

</html> 


Audio 2


<html>

<head> 

<title>auto play features</title>

</head>

<body>

<audio controls autoplay >

<source src="song.mp3" type="audio/mp3">

</audio>

</body>

</html> 



Then save the file

Audio 1 as audio1.HTML

Audio 2 as audio2.HTML


Output for the following code:-


For the both audio output is the same

Comment below and share to your Friends and you can also give suggestion regarding my blog below and follow me to get blog daily .

Comments

Post a Comment