HTML and CSS Reference
In-Depth Information
Inserting an audio file.
You would insert an audio file into a Web page if you want your Web site visitors to be able
to hear content or background music. In the case of this Web site, you will insert an audio
clip of a reading of the Longfellow poem "Changed."
Determine the area on the Web page into which you want to insert the audio
Plan
Ahead
clip . This was a simple task for the Web site under development. There is a
longfellow-audio.html Web page that discusses the poem. You center the controls
of the audio clip by using the class "audio" that is defined in the stylesch8.css
external style sheet.
Decide which attributes (if any) that you should use
. For this audio clip, you want the
audio clip to start automatically when the Web page is opened. The Web site visitors
will have the ability to pause, stop, or replay the audio clip using the default player
control panel provided.
To Start Notepad++ and Open an HTML File
1
Start Notepad++ and, if necessary, maximize the window.
2
With the USB drive plugged into your computer, navigate to the Chapter08\
ChapterFiles folder.
3
Double-click longfellow-audio.html in the list of files to open the file shown in Figure 8-5.
What is the purpose for the “audio” class on line 23?
This is a class identified in the external style sheet, stylesch8.css, to which you link on line
8. If you have not already done so, you should review that external style sheet. All classes
(on lines 15-17, 23, and 27) are created in that external style sheet.
link to external
style sheet
classes from external
style sheet
comment statement
on line 24
Figure 8-5
 
Search WWH ::




Custom Search