HTML and CSS Reference
In-Depth Information
<div class="content">
<!-- Your Content Goes Here -->
As you can see, using divs instead of meaningful markup makes it harder to
understand the content at first glance.
<audio />
The <audio /> element is used to embed audio content within a web page. This
is new to HTML5 and is not available in HTML4. For browsers not supporting
HTML5 audio, you can provide a link to a 3gp version of the audio file within the
<audio /> tag. Listing 3-5 shows how to embed an audio file.
Listing 3-5. How to Use the Audio Tag in HTML5
<audio controls="controls">
<source src="media/audio.oga" type="application/ogg">
<source src="media/audio.mp3" type="audio/mpeg">
Your browser does not support HTML5 Audio,
<a href="media/audio.3gp">click here to download</a>
This will render the native audio player for the handset. Within the <audio /> tag,
you will see several <source /> elements. These are used to provide different
audio formats for the browser, such as MP3, OGG, or WAV. You should specify
the mime type of the audio file in order for the browser to pick the correct audio
Figure 3-4 shows what an <audio /> element looks like in Android 4.
Search WWH ::

Custom Search