New! My 44-page ebook "CSS in 44 minutes" is out! 😃

Get it now →

# audio

Allows to embed an audio clip into a web page.

Example: Copy

<audio src="/assets/Hal.mp3" controls></audio>

src

Defines the source of the audio file.

Required.

"/assets/Hal.mp3"

You can use a relative path.

volume

Set the volume. Between 0.0 (silent) and 1.0 (loudest).

"0.0"

The track is silent.

"1.0"

The track is set to the loudest.

autoplay

The track will automatically start on load.

No value required.

controls

Show the browser's built-in audio controls.

No value required.

loop

The track will loop when reaching the end.

No value required.

muted

The track will be muted by default.

No value required.

preload

The track will be preloaded when the page loads.

No value required.