Audio in HTML
Audio playback, with the attributes that keep autoplay tolerable.
<audio controls preload="none">
<source src="/media/keystrokes.ogg" type="audio/ogg">
<source src="/media/keystrokes.mp3" type="audio/mpeg">
<p>
<a href="/media/keystrokes.mp3">Download the audio</a>
</p>
</audio>
<audio src="/media/click.wav" loop muted></audio>
How it works
controlsgives the browser's own player.loopandmutedare the only polite way to autoplay.preload=nonesaves bandwidth until the user asks.
The run, in numbers
- Lines
- 8
- Characters to type
- 263
- Tokens
- 59
- Three-star pace
- 75 tpm
At the three-star pace of 75 tokens a minute, this run takes about 47 seconds.
Step 3 of 9 in Media & embeds, step 10 of 23 in Semantics & metadata.