Skip to content
Justice Tech School

HTML Audio

The audio element plays sound. Add controls to show buttons and one or more source elements so each browser can pick a format it supports. Text inside is the fallback.

Example
<audio controls>
  <source src="song.mp3" type="audio/mpeg">
  <source src="song.ogg" type="audio/ogg">
  Your browser does not support audio.
</audio>

Exercise

Show play buttons.

<audio >

Quiz Test

Why give several sources?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.