The newly introduced HTML5 element provides a standard way to embed audio in web pages. However, the audio element is relatively new, but it works in most of the modern web browsers. The following example simply inserts an audio into the HTML5 document, using the browser default set of controls, with one source.

An audio, using the browser default set of controls, with alternative sources.

The ‘ogg’ track in the above example works in Firefox, Opera and Chrome, while the same track in the ‘mp3’ format is added to make the audio work in Internet Explorer and Safari.

Linking Audio Files

You can make links to your audio files and pay it by ticking on them.
Track 1
Track 2

Using the object Element

The element is used to embed different kinds of media files into an HTML document. Initially, this element was used to insert ActiveX controls, but according to the specification, an object can be any media object such as video, audio, Java applets, ActiveX, document (HTML, PDF, Word, etc.), Flash animations or even images. Here’s an example:

    

Using the embed Element

Theelement is used to embed multimedia content into an HTML document.

The following code fragment embeds audio files into a web page.