Arteqo Consulting

The European Web Agency

Design, brand and digital development


×

Arteqo Consulting Services

Contact Arteqo

×
I have read and accept the terms and conditions

audio tag

The audio tag, which, when implemented in the code, is written like this - <audio>, is an HTML tag that belongs to audio/video tags. Audio and Video HTML tags are used to insert audio and video content. The multimedia content is played thorugh the default player of a user's browser.

<audio> defines audio content which can be listened to. This tag is supported in the current version of HTML, which is HTML5.

Browser support

Here you can see whether <audio> is supported by a certain browser, and, if yes, starting from which version it is supported.

Browser support for <audio>
ChromeFirefoxEdgeOperaSafari
Supported since Chrome v6Supported since Firefox v3.5Supported since Edge v9Supported since Opera v10.5Supported since Safari v4

Attributes and values

An attribute is a piece of additional information about a tag. While tags denote the type of objects they mark or create, attributes set the parameters of these objects. These parameters can include anything from the types of possible interactions to its visual style to its actual contents.

Values indicate how a certain attribute is actually implemented, if there is a number of ways it can happen.

What attributes are actually allowed in a certain tag depends on the tag itself. Much like possible attributes depend on a tag, possible values depend on an attribute.

The <audio> tag supports the following attributes (with their respective values):

AttributeValueDescription
autoplayautoplaySpecifies that the audio will start playing as soon as it is ready
controlscontrolsSpecifies that audio controls should be displayed (such as a play/pause button etc)
looploopSpecifies that the audio will start over again, every time it is finished
mutedmutedSpecifies that the audio output should be muted
preload
  • auto
  • metadata
  • none
Specifies if and how the author thinks the audio should be loaded when the page loads
srcURLSpecifies the URL of the audio file

Global Attributes

Global attributes are HTML tag attributes that can be used by any tag, hence the name "global". They are in contrast to unique attributes that are tag-specific.

<audio> supports global attributes.

Event Attributes

Event attributes are HTML tag attributes that allow triggering actions upon specific conditions, hence the name "event". Other types of attributes, namely global and unique attributes, can also trigger actions, but the difference is that even attributes allow calling scripts, such as JavaScript functions, while most other attributes only support a certain type of action.

<audio> supports event attributes.