Linking to Audio in HTML

The <a> element is used to link to an audio file the same way as it is used to link to any other type of file. Figures 7.1 and 7.2 show how it is used and depict the result. Clicking the link opens a helper application, a media player in this case, to play the specified audio file. The advantage of playing audio with a helper application, as opposed to a plug-in, is that the audio continues to play when users navigate to a different page.

Source: Sklar David (2016), HTML: A Gentle Introduction to the Web’s Most Popular Language, O’Reilly Media; 1st edition.

Leave a Reply

Your email address will not be published. Required fields are marked *