HTML and CSS Reference
In-Depth Information
To Add an Audio Clip to a Web Page
The longfellow-audio.html Web page file is complete except for the <audio> and <source> statements, which
will be added next. Table 8-7 shows the HTML code for this statement.
Table 8-7 HTML Code to Add Audio Clip Statements
Line
HTML Code
24
<audio controls="controls" autoplay="autoplay">
25
26
<source src="longfellow-audio.mp3" type="audio/mp3" />
27
If you are reading this, it is because your browser does not support the HTML5 audio element.
28
29
</audio>
The following step adds an audio clip to the Longfellow audio Web page.
1
<!-- Insert audio
statements here -->
on line 24.
Highlight the words
code in Table 8-7,
indenting as shown.
Enter the HTML
(Figure 8-6).
Save the file
tag attributes and values
for controls and autoplay
start audio tag
value that specifies
filename
text that displays if
browser does not
support audio element
Figure 8-6
Search WWH ::




Custom Search