I just found this site and look forward to learning from all of you !

I am trying to put a mp3 on my one page site. It is a song of the star spangled banner an since today is memorial day its kinda time sensitive. I have looked all over and tried to understand what everyother site says to do but nothing seems to work.

FYI
I have komposer as my html editor
I have hostgator as my hosting
I also have access to my cpanel (although I dont fully understand it)
I have filezilla for ftp transfer

Thanks
Jeff

Dani AI

Generated

A modern, reliable solution is to upload the MP3 to the site and use the HTML5 audio element rather than legacy tags. The replies from (which suggested <embed>/.mid) and (which suggested <bgsound>) point to older techniques: MIDI (.mid) is not the same as MP3, and <embed>/<bgsound> are inconsistent or browser-specific. HTML5 audio gives predictable results across current browsers and a graceful fallback path.

Basic workflow (for with HostGator/cPanel/FileZilla):

  1. Upload the file into the web root (for example public_html/audio/anthem.mp3) with FTP or cPanel File Manager.
  2. Verify the file URL opens directly in a browser and that file permissions are readable (commonly 644).
  3. Insert an audio tag in the page source.

Example markup:

<audio controls preload="none">
  <source src="/audio/anthem.ogg" type="audio/ogg">
  <source src="/audio/anthem.mp3" type="audio/mpeg">
  Your browser does not support the audio element. <a href="/audio/anthem.mp3">Download</a>.
</audio>

Quick troubleshooting and notes:

  • Test the direct URL first (enter the MP3 URL in the browser). If it downloads instead of playing, check MIME type and server settings.
  • File paths on Linux hosts are case-sensitive; confirm the exact filename.
  • Mixed-content blocking: an HTTPS page will block HTTP media. Serve the MP3 via HTTPS or use a relative path (Mixed content).
  • Autoplay is often blocked (especially on mobile); prefer showing controls so visitors can start playback. See the HTML5 audio reference for details (HTML5 audio element).
  • Ensure legal right to host the recording before publishing.

Recommended Answers

All 2 Replies

you might want to try this in your html

<embed src="yourmusicfile.mid" autostart="true" loop="true"
width="2" height="0">
</embed>
<noembed>
<bgsound src="yourmusicfile.mid" loop="infinite">
</noembed>

try this one

<bgsound src="your mp song path" loop="-1" volume="100" />
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.