HTML <audio> src Attribute

❮ HTML <audio> tag

Example

<audio src="cat.mp3" controls>
	Your browser does not support the audio tag.
</audio>

Meaning

The src attribute is set to the URL of the audio to show.

This attribute is optional; you may instead use the <source> element within the audio block to specify the audio to embed.


Standard Syntax

<audio src="URL">
	Your browser does not support the audio tag.
</audio>



Browser Support




Status







Attribute Values

Value Description
URL

Value can be

  • An absolute URL - navigate to within or another web site ( href="http://www.example.com/index.html")
  • A relative URL - navigate to within a web site ( href="index.html")
❮ HTML <audio> tag