Define Audio Attribute Specification in HTML 5

In this article I will explain Define Audio Attribute in HTML 5
  • 2024

Audio Attribute in HTML 5

  • Most commonly used audio formats are ogg, mp3 and wav.

  • <source> tag to specify media along with media type and many other attributes.

  • An audio element allows multiple source elements and browser.

Audio Attribute Specification:

The HTML5 audio tag can have a number of attributes to control the look and feel and various functionalities of the control

  • src  The URL of the audio to embed. This is optional; you may instead use the <source> element within the video block to specify the video to embed

  • autoplay  This boolean attribute if specified, the audio will automatically begin to play back as soon as it can do so without stopping to finish loading the data

  • autobuffer  This boolean attribute if specified, the audio will automatically begin buffering even if it's not set to automatically play.

  • loop  This boolean attribute if specified, will allow audio automatically seek back to the start after reaching at the end.

  • controls  If this attribute is present, it will allow the user to control audio playback, including volume, seeking, and pause/resume playback.

  • preload  This attribute specifies that the audio will be loaded at page load, and ready to run. Ignored if autoplay is present.

Further Readings

You may also want to read these related articles

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.