donotturnoff

audio

Description

The audio element is used to provide audio on a page. In the case that the specified audio cannot be found or the format is not supported by the browser, the element's children will be rendered. This allows for multiple alternative audio sources to be defined, in case a browser doesn't support some of the formats, as well as a custom error message if loading fails.

Example code

body {
 audio(src="song.wav") {
  audio(src="song.mp3") {
   p { "This audio could not be loaded" }
  }
 }
}

Attributes

All elements have the global attributes.

Additional attributes

src
Specifies the location of the audio file to use.
type
Specifies the MIME type of the audio file.

Default style

None.

SDTPBrowser support

Date Note Commit
Added to SDTPBrowser as skeleton element without audio functionality. 8b7ffcb22f98c774fa8de9066f7fbdd08fbf5f96 git GitHub

Related elements