Welcome, Hunter! 👋 Enjoy 50% OFF annual plans with code PRODUCTHUNT — limited time ⏳
50% OFF annual plans — code PRODUCTHUNT

HTML Background Music Widget

Set the mood on your pages with a customizable background audio player – add personality, atmosphere, or just the right vibe to your website.
4.8 rating
10,000+ reviews
Free plan available
Create Widget for Free
No credit card needed
HTML Background Music Widget

Create your Background Music widget

Configure your widget and add it to your HTML website for free!

Screenshots

HTML Background Music Widget
1 / 6

Why People Love Elfsight

Music has a way of making a moment memorable. With the Elfsight Background Music widget, you can add background music to HTML pages in just a couple of clicks. Whether it’s calm instrumentals for a portfolio, upbeat tracks for an event page, or even seasonal playlists for a shop – you set the tone, and your visitors feel it instantly.

It’s quick to set up and even easier to manage. You don’t need to know how to add background music to HTML manually, or tinker with complicated scripts. Just design your player, copy one line of code, and paste it where you want the music to play.

Did you know?

A consumer survey found that 70% of customers feel more connected to a brand when listening to its tailored music selections.

Let your brand make that connection – add Background Music with Elfsight for free today and let your visitors feel what your brand sounds like.

Key Features of the HTML Background Music Widget

Here’s what makes this widget stand out:

  • Custom player styles: Match your music controls with your brand colors and fonts.
  • Flexible playback: Choose whether to autoplay, loop, or let visitors control playback.
  • Multiple tracks: Add one song or a whole playlist – perfect for special campaigns.
  • Works everywhere: From portfolios to online stores, it’s easy to embed or play background music in HTML.
  • Beginner-friendly: If you can copy and paste text, you can set this up—no need to edit HTML code for background music by hand.
  • Responsive design: The player works smoothly on desktop, tablet, and mobile.

Try the widget free in our live editor – no signup required

How to Add Background Music to HTML

You’ve got two simple ways to make it work:

Method 1: Inline Music Player

Great if you want music to play only on certain pages, like your homepage or a landing page. The player sits neatly inside your content where you place it.

  1. Select a Template: Open the Elfsight editor and pick your player style.
  2. Customize the Widget: Upload your tracks or link your source, adjust autoplay, loop, and volume settings.
  3. Generate the Code: Click “Add to website” and copy the code snippet.
  4. Embed on the Website: Paste it right where you want the player to appear in your HTML page.

Method 2: Floating Music Player

Ideal if you’d like the soundtrack to follow people as they scroll. The floating player stays visible at the bottom or side of the screen, so your music is always just a click away.

  1. Pick a Template: Select a floating layout like a bottom bar or sidebar.
  2. Customize the Widget: Add tracks, set design, playback, and playlist options.
  3. Generate the Code: Once you finish the customization, click “Add to website for free”, and copy the embed code from the editor.
  4. Embed on Your Website: Paste it into your HTML just before the closing </body> tag so it appears across the entire website.

Need more guidance? Visit our Help Center, explore our blog article on how to add background music to your website. Feel free to share new ideas in the Wishlist. For recent updates, check the Changelog.

FAQ

Is this widget free to use?

Yes, Elfsight offers multiple plans. You can start with the free plan and upgrade later if you want more tracks, plays, or features.

Can I choose when the music plays?

Absolutely, you decide whether the music starts automatically, loops, or only plays when clicked.

What audio formats are supported?

Most common formats like MP3 and WAV are supported. You can also link external audio sources.

Can I add multiple songs?

Yes, you can create a playlist and let visitors skip through tracks.

Does it work on mobile devices?

Yes, the player is fully responsive and adjusts to screens of all sizes.

How is this different from adding HTML code for background music manually?

With Elfsight, you don’t need to worry about coding or browser compatibility, the widget handles all the technical setup for you.

Pricing

14-day money back guarantee. Risk-free, you can cancel at anytime.
Elfsight Apps
Multi-platform digital solution
from $0 / month
start with free plan
Unlimited domains
24/7 customer support
Charge-free installation service
Special offer for multiple apps
Fully customizable