Review: The Audio Element
A full audio element is a combination of resource location and access attributes:
Single-Source
HTML
<audio src="#" preload controls></audio>
<!-- For example... -->
<audio src="./media/duckett-audio.ogg" preload controls>
<p>Sorry, your browser does not support our audio format.</p>
</audio>
Multiple-Source
HTML
<audio preload controls>
<source src="#" type="">
<source src="#" type="">
</audio>
<!-- For example... -->
<audio preload controls>
<source src="./media/duckett-audio.ogg" type="audio/ogg; codecs=vorbis" />
<source src="./media/duckett-audio.mp3" type="audio/mpeg" />
<p>A sample of smooth jazz music.</p>
<p>This browser does not support our audio format.</p>
</audio>
- Previous
- Next