Linking to a sound file using a href allows a browser to open and play an audio file if the viewer of your web page has properly configured their Internet browser. You can also use the
tag
Example code
Result
Play sound file
With audio files, we recommend using the .MP3 file format because of its wide acceptance on the Internet, and is utilized by all browsers and operating systems.
The
An older method of including audio files is to use the
Related information
- How to insert a movie or video in an HTML document.
- How to add pictures to an HTML website.
- See our sound definition for further information and related links.
- HTML and web design help and support.