Functionality of HTML Audio

  • The controls attribute specifies which controls including volume, play, and pause on the audio player.
  • Autoplay designates that the audio file will play as soon as controls are loaded.
  • The attribute loop specifies that the audio file is set to continuously repeat.
  • The attribute src defines the URL of the audio file.
  • The attribute muted specifies the audio file should be muted.

HTML Audio

The HTML Audio offers the <audio> element, that allows websites to provide background music, sound effects, or play any audio content required for the website and enhance the overall user experience. The element <source> is wrapped inside the <audio> element that defines the source of the audio files as a value of an attribute src.

Similar Reads

Syntax

...

Functionality of HTML Audio

The controls attribute specifies which controls including volume, play, and pause on the audio player. Autoplay designates that the audio file will play as soon as controls are loaded. The attribute loop specifies that the audio file is set to continuously repeat. The attribute src defines the URL of the audio file. The attribute muted specifies the audio file should be muted....

HTML Audio Media Types

The mp3 file format with media type audio/mpeg. The ogg file format with media type audio/ogg. The wav file format with media type audio/wav....

HTML

The autoplay attribute is used to start an audio file automatically....

Browser Support

...

Contact Us