Advertisements
Advertisements
Question
Gulzar is a talented musician. He is trying to create a web page so as to share his creations with music lovers across the world. He wants to embed audio and video files in the web page with the following specifications:
To embed audio files:
- The name of the audio file is GulzarNotel.mp3
- The audio should start playing automatically when the page loads.
- The audio controls such as Play, Pause, and Volume should be visible.
To embed video files:
- The name of the video file is GulzarMoviel.mp4.
- The video should play in a window of width 350 pixels and a height of 250 pixels.
- The video controls such as Play, Pause, and Volume should be visible.
To complete the task, Gulzar has written the following HTML code:
To embed audio:
<audio controls autoplay>
<source src="GulzarNotel.mp3''>
</audio controls>
To embed video:
<video width = "350" height = "250">
<source src = "GulzarMoviel.mp4">
</video>
Gulzar is not getting the desired output as the code contains errors. Rewrite the correct statements to help him to complete the task. Underline all the corrections made.
Short/Brief Note
Advertisements
Solution
Correct code to embed audio:
<audio controls autoplay>
<source src="GulzarNotel.mp3">
</audio>
Correct code to embed video:
<video width="350" height="250" controls>
<source src="GulzarMoviel.mp4">
</video> shaalaa.com
Inserting Audio and Video
Is there an error in this question or solution?
