हिंदी

Explain how to insert an audio on a web page using <audio> tag. Give example to support your answer. - Computer Applications

Advertisements
Advertisements

प्रश्न

Explain how to insert an audio on a web page using <audio> tag. Give example to support your answer.

स्पष्ट कीजिए
Advertisements

उत्तर

The <audio> tag in HTML5 embeds audio information on a webpage. It allows you to play audio files such as MP3, OGG, and WAV directly in your browser. Control playback with the <audio> element’s play, pause, and volume attributes.

Example:

<audio>
<source src="sample.mp3" type="audio/mpeg">
</audio>

The autoplay feature is used to start the audio file playing automatically whenever the webpage’s URL is loaded.

Attributes  Description
Controls Designates what controls to display with the audio player.
Src Designates the URL of the audio file.
Loop Designates that the audio file should continuously repeat.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2024-2025 (March) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×