How to use music in a web page?

Asked By 0 points N/A Posted on -

I want to use a music that plays in the background whenever my website opens but I am not able to figure out how to do it.

Can I do it by using HTML only.

Any suggestion please.

Answered By 0 points N/A #116780

How to use music in a web page?



To do this, you need .ogg file and .mp3 file. Most browsers support mp3 files.

You need a text editor.You can use notepad ++ .

In your HTML source body  use the code:

 <audio autoplay = “autoplay “  controls= “controls “>

< source src = “ type your source ( say  Valbuena.ogg) “  />

< source src = “ type your source ( say Valbuena.mp3) “ />


Save it and run.

I do the same using Webstarts ( From page editor view Click insert >> music on tool bar. Upload music from computer. Click browse. Once file is uploaded set playback options. Set your audio to play automatically by checking autoplay box and making audio automatically repeat by checking the loop box. Click insert file to place audio on your webpage. Drag and drop playback controls where you like them to appear on your page.

Login/Register to Answer

Related Questions