Hi friends . recently i create one blog for music . i want to knw how to add the Songs in blog for Online hearing . . . please help . . . i searched one day and did not found . please help
AjithAnnadurai 0 Newbie Poster
Dani AI
Generated
Two practical routes to add playable songs to a Blogger post: use a modern HTML5 player for self-hosted files, or embed a third‑party streaming widget (SoundCloud, Bandcamp, YouTube, etc.). ’s examples use legacy plugin/object embeds; those can still work in some old desktop setups but are unreliable on modern browsers and mobile devices. needs a solution that works cross‑platform today.
A minimal, browser-friendly approach is the HTML5 audio element — it gives built‑in controls and works without plugins:
<audio controls preload="none">
<source src="https://example.com/path/song.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio> Key implementation notes and troubleshooting tips:
- Host the file where it can be fetched by visitors (public URL), and ensure the server returns the correct MIME type (for MP3:
audio/mpeg). If playback fails, check the file URL in a new tab and inspect response headers. - MP3 is the most compatible format; add Ogg/Opus sources only if you need legacy open‑source browser support. For seeking and smooth playback, the server should support HTTP range requests.
- Autoplay is widely blocked on mobile/desktop unless user interaction or muted playback is used; prefer
controlsso users can start playback. - If using advanced JS (Web Audio API) or cross‑domain hosting, configure CORS (
Access-Control-Allow-Origin) on the host so browsers allow programmatic access. - For bandwidth, reliability and licensing, prefer a streaming/hosting service with embed widgets if you expect many listeners or don’t control server resources.
For reference on the element and attributes, see the HTML5 audio element. Check Blogger’s help for gadget/embed options at . Always confirm you have streaming/publishing rights for any copyrighted music before posting (see U.S. Copyright Office).
george61 0 Junior Poster in Training
Try this:
<html>
<body>
<embed src="music/song.mp3" autostart="true" loop="false" width="350"
height="200">
</body>
</html> or this for better look
<html>
<head>
<script>
document.write('<TABLE BORDER="3" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#99CCFF" BORDERCOLORLIGHT="#DBEDFF" BORDERCOLORDARK="#5B7997"><tr><td>');
document.write('<object id="MediaPlayer1" width="300" height="45" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="" standby="Loading Microsoft Windows Media Player..." type="application/x-oleobject">');
document.write('<param name="FileName" value="music/song.mp3">');
document.write('<param name="animationatStart" value="false">');
document.write('<param name="transparentatStart" value="true">');
document.write('<param name="autoStart" value="true">');
document.write('<param name="showControls" value="true">');
document.write('<param name="Volume" value="-100">');
document.write('<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" Name="MediaPlayer" src="song.mid" AutoStart="true" ShowStatusBar="1" volume="-1" HEIGHT="50" WIDTH="300"></embed></object>');
document.write('</td></tr></table>');
</script>
</head>
</html> Edited by george61 because: n/a
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.