Adding an audio file to HTML

I have been building a web page on my Chromebook and would like to add an audio file to it from my downloaded MP3 files. I have tried quite a few things, and the code that has worked best for me is <audio controls> <source src="" type="audio/mpeg"/> </audio>
and in the src I have tried a variety of files. If anyone has any ideas I would be so pleased.

In order for people to access a file (like an image or a sound file) online, that file must be on the internet. Currently, the file is on your personal computer, which I do not have access to. You will need to find a service that will host your audio file.

I guess I should have said earlier, but I will not be putting this web page to the internet. I plan on just keeping the file on my computer and sending the HTML and CSS files to another persons computer. Also the MP3 file is a song that I have ripped from a CD.

If your audio file is in the same project folder, you can use a relative link to it instead of a url. You will need to bundle the complete project, including the audio file to send to your friend.

If you could please send me an example of code that would really help me out :slight_smile:

I don’t know what you mean. I haven’t made whatever you’re working on, so I can’t send it to you.

Silly me :rofl: thanks for all your help :slightly_smiling_face: