Date First Published: 27th February 2023
Topic: Web Design & Development
Subtopic: Web Development
Article Type: Computer Terms & Definitions
Difficulty: MediumDifficulty Level: 5/10
Learn more about what the HTML <audio> tag is in this article.
In HTML, the <audio> tag is used to embed audio content, such as music into a document. This HTML5 tag supports videos in the MP4, WebM, and OGG format, is supported by modern web browsers, and includes built-in functionality to customise how the audio works on the webpage, such as pause/play buttons and volume buttons.
The <audio> tag is only designed for playing audio. It does not display a video player with the video, like the <video> tag does.
The text between the <audio> and </audio> tags only displays in browsers that do not support the audio element.
An example of the <audio> tag can be seen below:
Below are the attributes for the <audio> tag.
Attribute | Description |
---|---|
Autoplay | Specifies that the video will start playing as soon as it loads. |
Controls | Specifies which controls to display with the audio player. |
Loop | Specifies that the audio should play again every time it is finished. |
Muted | Specifies that the audio file should be muted. |
Preload | Specifies how and when the video should be loaded when the page loads. |
Src | Specifies the URL of the audio file. |
If so, it is important that you tell me as soon as possible on this page.
Network Services Network Setups Network Standards Network Hardware Network Identifiers Network Software Internet Protocols Internet Organisations Data Transmission Technologies Web Development Web Design Web Advertising Web Applications Web Organisations Web Technologies Web Services SEO Threats To Systems, Data & Information Security Mechanisms & Technologies Computer Hardware Computer Software Ethics & Sustainability Legislation & User Data Protection