HTML and CSS Reference
In-Depth Information
The next example shows an <audio> element in IE8 . The <audio> ele-
ment itself is ignored, and just the contained content is displayed:
<audio src="myaudio.ogg" controls>
Audio not supported.
Normally you would want to display something more useful than just
the fact that the <audio> element isn't supported. At least if you show a
link, the user has the chance to download the audio file and listen to it
in an external player:
<audio src="myaudio.ogg" controls>
<a href="myaudio.ogg">
Download myaudio.ogg
Compare that with a browser like Firefox that does support the <audio>
element, but not the media type specified in the src :
<audio src="myaudio.ogg" controls>
Audio not supported.
<audio src="myaudio.mp3" controls>
Audio not supported.
Firefox doesn't support MP3 , so the
user still sees an audio control, but it's
inactive. In other browsers, you may
see a broken image icon or some
other indication that the media is
The <audio> element controls allow for a limited amount of styling with
CSS . Here it's been set to 200 pixels square in Firefox:
Search WWH ::

Custom Search