Page 177 - Web Applications (803) Class 12
P. 177
LAB ACTIVITY
Combine HTML and JavaScript code to play your favourite song!
<p> Listen to Music!</p>
<img src=”soundsymbol.png” height=”150” weight=”100” border=2> <br><br>
<audio id=”mySong” controls>
<source src=”Mymusic.mp3”>
<source src=”Mymusic.ogg”>
</audio>
<br><br>
<button onclick=”document.getElementById(‘mySong’).play()”>Play Music</
button>
<button onclick=”document.getElementById(‘mySong’).pause()”>Pause Music</
button>
<button onclick=”document.getElementById(‘mySong’).pause(); document.
getElementById(‘mySong’).currentTime = 0;”>Stop Music</button>
Now create a similar webpage for your friend by including his favourite song.
Previous Years’ Questions
1. A file with an extension .jpeg indicates that it is a/an ............................ file. [2023]
Ans. Image
2. ............................ is a type of image format that does not consist of pixels, but objects such as curves, shades and
characters. [2023]
Ans. Vector
3. Consider the following code: [2023]
<param name = “controller” value = “False”/>
On execution of the above code, is the object controller displayed in the browser?
Ans. No, the object “controller” will not be displayed in the browser.
4. ............................ is the extension of a standard Macintosh image file.~ [2023]
(a) .pict (b) .docx
(c) .xls (d) .wav
Ans. (a) .pict
Customising and Embedding Multimedia Components in Web Pages 175

