Adding sounds to HTML pages

Add a final h2 heading saying Sounds.  Download this sound track and this one and save them in the same folder as your Web pages.  Add this code to your page:

<audio controls>    
    <source src="cat.ogg" type="audio/ogg">
    <source src="sealion.mp3" type="audio/mpeg">

    Your browser seems to be struggling - maybe get a newer one (they are free).

You should be able to understand the code as it is basically the same as the video element.  Again ogg is an open format but mp3 is licenced and so ogg is preferred by the people who standardise the Web but some browsers will prefer mp3.  Try the page in more than one browser to see which they use.  If they can handle ogg they will use it but if not they will try the mp3 file.  You can use wav files as well but they are slow to download.

The sound player in a browser