Results 1 to 5 of 5

Thread: How to add song to my website?

  1. #1
    Join Date
    Nov 2005
    Posts
    56

    How to add song to my website?

    Hi,

    I have a webpage & i want to add music to my page while opening.

    I know this is possible but i don't to how to put the song in the website?

    I have the song in mp3 format! Please help me adding the song to my webpage! I also want an option for user to stop the song playing i mean disable option!
    This is pure HTML if you have other ways for getting this then also let me know how?
    Please help me regarding the same!

  2. #2
    Join Date
    Feb 2009
    Posts
    133

    Re: How to add song to my website?

    Adding a song to HTML website is very simple if you know the basic of html page code & some tags!

    You need to have your song in Midi, mp3, wav file etc. (you have .MP3 format)

    You need a simple link to your music, then add this HTML code to your webpage source code & save it!

    Steps to Adding the HTML Music Code

    1. Song has to be in midi format because it is a good sound format to use because these files are generally smaller and load quickly. 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.

    2. Upload (save) this music file to your web server

    3. Now open the web page you want the song to load with. You'll have to insert the following HTML code into your site, but first you'll need to edit it.

    HTML Code:
    <embed src="musicfile.wav" autostart="true" loop="false">
    4. Replace musicfile.wav with the name of the music file you chose to upload to your web server. The code above also assumes you've saved the file in the same location of your homepage (index.html). If you save the file inside a folder on your root then you'd have to change the path slightly.
    IF YOU CAN'T Convince THEM ...

    CONFUSE THEM ...

  3. #3
    Join Date
    May 2008
    Posts
    115

    Re: How to add song to my website?

    From my vb.net project I will just put the logic here:

    Code:
    Private Sub Form_Load()
        
        WebBrowser1.Navigate2 App.Path & "\bgmusic.html"
        
    End Sub
    Here is my web page:
    HTML Code:
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <embed src="song.mp3" autostart="true" hidden="false" loop="false">
    <noembed>
    <bgsound src="song.mp3" loop="1">
    </noembed>
    </embed>
    </body>
    </html>

  4. #4
    Join Date
    May 2008
    Posts
    184

    Re: How to add song to my website?

    I know you could do it with Javascript, by setting the src or href attribute to " ".
    say your music tags ID was music:

    HTML Code:
    <script type="text/javascript">
    function turnoff(){
    element=getElementById('music');
    element.src=" ";
    }
    </script>
    <input type="button" onmousedown="turnoff()" />
    or if your element uses href instead of src, just switch it out.
    does that help?

  5. #5
    Join Date
    May 2011
    Posts
    1

    Re: How to add song to my website?

    Quote Originally Posted by madjack View Post
    Adding a song to HTML website is very simple if you know the basic of html page code & some tags!

    You need to have your song in Midi, mp3, wav file etc. (you have .MP3 format)

    You need a simple link to your music, then add this HTML code to your webpage source code & save it!

    Steps to Adding the HTML Music Code

    1. Song has to be in midi format because it is a good sound format to use because these files are generally smaller and load quickly. 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.

    2. Upload (save) this music file to your web server

    3. Now open the web page you want the song to load with. You'll have to insert the following HTML code into your site, but first you'll need to edit it.

    HTML Code:
    <embed src="musicfile.wav" autostart="true" loop="false">
    4. Replace musicfile.wav with the name of the music file you chose to upload to your web server. The code above also assumes you've saved the file in the same location of your homepage (index.html). If you save the file inside a folder on your root then you'd have to change the path slightly.
    Thank you for the knowledge!

Similar Threads

  1. How to block website using Website blocker?
    By Edi in forum Windows Software
    Replies: 6
    Last Post: 02-07-2011, 10:46 PM
  2. Replies: 4
    Last Post: 25-06-2011, 07:58 PM
  3. On iPod Touch song automatically skips to the next song
    By Oms-waroop in forum Portable Devices
    Replies: 5
    Last Post: 14-02-2011, 10:36 PM
  4. Norton Safe Web won't verify my Website Tonight website
    By Chang2 in forum Networking & Security
    Replies: 5
    Last Post: 17-09-2010, 09:47 PM
  5. Replies: 2
    Last Post: 05-11-2009, 08:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,934,873.00048 seconds with 17 queries