How to Add Background Music To Website – website background music

By | July 23, 2016

Add Background Music To Website ,learn how to Add Background Music To Website,how to Add Background Music To Website.

Learn how to Add Background Music To Website.Every webmaster and web developer want that his website look good and user friendly.Many people ask me such question that“How to Add Background Music To Website????”.

So don’t worry i am here to help you in this purpose.Here you can find variety of method how to Add Music To Website in background.

Add Background Music To Website

Mathod 1
You can add HTML background music code to your website by using the <audio> element, but omitting the controls attribute. The controls attribute specifies that there should be controls (such as a “Play” button, “Pause” button etc) so by removing this attribute, no controls will be displayed.

You can test this using the example below. The example currently contains the control attribute. Try replacing that attribute with autoplay, then clicking “Update”.

add background music to website[howpk.com]

add background music to website[howpk.com]

Example of code:

<audio src=”/music/good_enough.mp3″ controls>
<p>If you are reading this, it is because your browser does not support the audio element.</p>
</audio>

Find a music or sound file that you’d like to use.  Midi (.mid) is a good sound format to use because these files are generally smaller and load quickly.

There plenty of sites on the internet that allow you to download these types of songs for free.  Use your favorite search engine to find the perfect song for your site.

You can also use .mp3 or .wav (wave) music, but keep in mind that if you do go this route, it will take the music longer to load because the file size will be larger.  Be mindful of those who still have dial up Internet access.

Mathod 2:

add the embed music to your page

<embed src=”yourmusicfile.mid” autostart=”true” loop=”true”
width=”2″ height=”0″>
</embed>

if you have any question .feel free to comment us.

Author: Tanvir Zafar

Tanvir Zafar is a internet Entrepreneur and owner of this site and many others as well. He is student in GCUF doing BS Software Engineering. :)