Linking to an Audio Clip

As you learned earlier in this chapter, you have several options for inserting a sound clip on a Web page. One user-friendly way to offer a clip is to provide a hyperlink to it. Use a standard <a> tag, the same as with any other hyperlink, but point to the audio file rather than to a Web page, as shown in the following example:

<p>Chris Cannon, General Manager of The Garden Company, offers an
<a href="welcome.wav">audio greeting</a>.</p>

When the visitor clicks that link, the audio clip will play in whatever program is configured on his or her computer to handle files of that type. On most Windows XP systems, the default player for WAV files is Windows Media Player.

Tip

To change the association between a file format and a ...

Get HTML and XHTML Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.