How to Convert MP3 Into a HTML Code

By Ashan R. Hampton

Digital music files are popular additions to web pages, especially social networking sites. Before music can be streamed online, it must be converted to a compatible file format. MP3 is the most common file type for music, due to its small compression size and cross platform accessibility. Different types of MP3 converter software or CD rippers are available online for free. Once music files have been successfully converted, MP3s can be added to HTML documents or web-based media players.

Convert music files to MP3 format. Other extensions such as WMA or CDA will not load to the Internet effectively.

Upload MP3s from a local computer to the Internet through a website hosting account. The MP3s must be loaded onto the web before inclusion in HTML code.

Once the file is posted to the internet, copy and paste the URL address. The web address for the MP3 file can be accessed in two ways: click the file to open it in a new browser window then copy and paste the address that appears in the web browser or right click the MP3 file and choose "copy shortcut" from the submenu.

The address should look something like this:

Open a new document in Notepad or another HTML editor. Paste the code into the document for reference.

Attach the MP3 to a link so that users can easily download it. For example, type the following HTML code within Notepad:

Download this song

To test the link, save the Notepad document as an html page. Click "File" then choose "Save as" from the submenu. In the file name box, type test.html. Under "Save as type" click "All files." Save the page to the desktop.

Open the HTML page on the desktop in Internet Explorer. Click the MP3 link. If a download box appears and the file opens within a media player, the HTML code is correct.