Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Adding Background Music to HTML  (Read 12320 times)

0 Members and 1 Guest are viewing this topic.

Barnum

    Topic Starter


    Rookie

    Adding Background Music to HTML
    « on: July 24, 2008, 07:48:23 PM »
    I am trying to learn HTML, and have had some success with the various codes, but for some reason I cannot add background music to my practice website.

    This is what I have tried, but it does not work when I view website in browser.
     <BGSOUND SRC="Bluesette.mp3" AUTOSTART="TRUE">

    Any help for this newbie would be appreciated.

    Astoria



      Intermediate

      Re: Adding Background Music to HTML
      « Reply #1 on: July 24, 2008, 08:55:43 PM »
      I am trying to learn HTML, and have had some success with the various codes, but for some reason I cannot add background music to my practice website.

      This is what I have tried, but it does not work when I view website in browser.
       <BGSOUND SRC="Bluesette.mp3" AUTOSTART="TRUE">

      Any help for this newbie would be appreciated.


      Try <embed src="Bluesette.mp3" autostart="true">



      kpac

      • Web moderator
      • Moderator


      • Hacker

      • kpac®
      • Thanked: 184
        • Yes
        • Yes
        • Yes
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 7
      Re: Adding Background Music to HTML
      « Reply #2 on: July 25, 2008, 03:32:29 AM »
      Did you place that code in the <head> or the <body> of your page? The <head> is where it is supposed to go.

      squall_01



        Prodigy

        Thanked: 80
        Re: Adding Background Music to HTML
        « Reply #3 on: July 25, 2008, 04:45:15 AM »
        Thats not true, Try embeding it.  Yes you can put it in the head of your template but thats mainly for java,javascript an such like that.  More or less scripts an codes that you want to run in the back where people cant see it physically but its there.   But it depends on how you want to lay it out.  I put mine near the end of mine so that its easier to find.
        Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

        If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

        Barnum

          Topic Starter


          Rookie

          Re: Adding Background Music to HTML
          « Reply #4 on: July 25, 2008, 08:34:21 PM »
          Thanks for the suggestions... When I use the embed code I get the diagram, but nothinig plays.  I would prefer the BGSOUND so that the music starts automatically.  I tried placing the command in head, body, etc.. nothing seems to work. 

          Keep iin mind I just started learning HTML about two weeks ago, and I know I am probably doing something very stupid.  Looking forward to any other suggestions you might have....

          squall_01



            Prodigy

            Thanked: 80
            Re: Adding Background Music to HTML
            « Reply #5 on: July 26, 2008, 05:32:30 AM »
            Its been a while since I done this but this should get it working.  <embed src=".mp3" autostart="true" hidden="true" loop="true">
            here is the code you want this will work on mp3 while bgsound will only do things like midi files.  Notice the code an it should make some sense.  I got this off my page so its coded right.  But how are you storing your files?  If your links arent working then you wont have sound probably ether.
            Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

            If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

            Barnum

              Topic Starter


              Rookie

              Re: Adding Background Music to HTML
              « Reply #6 on: July 26, 2008, 07:02:27 AM »
              Okay, let me ask another stupid question....  What do you mean by "how are you storing your files"

              I am putting together my "practice" site or program in Wordpad.  When I want to check it out I go to IE,  and open it.  I usually have both programs up at the same time to check things quicker, using the refresh button each time I make a change.

              Barnum

                Topic Starter


                Rookie

                Re: Adding Background Music to HTML
                « Reply #7 on: July 26, 2008, 07:05:00 AM »
                Squall, tried the code you suggested.  Still nothing...

                Astoria



                  Intermediate

                  Re: Adding Background Music to HTML
                  « Reply #8 on: July 26, 2008, 10:56:10 AM »
                  could you post the entire code u have now?



                  squall_01



                    Prodigy

                    Thanked: 80
                    Re: Adding Background Music to HTML
                    « Reply #9 on: July 26, 2008, 11:01:18 AM »
                    All the html files you created have to be in a folder or something.  If there not on the desktop you have to tell it where the file is that you want.  Such as if its on another harddrive it would be d:/nameofsite/linkname such like that for a link an applies to other files that are else where.  Could you also post your info an let me check?  Are you also </embed> ending it?
                    Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                    If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                    Barnum

                      Topic Starter


                      Rookie

                      Re: Adding Background Music to HTML
                      « Reply #10 on: July 26, 2008, 05:35:56 PM »
                      All my photos & music for the site are in My Documents.    It's my understanding that if I use embed I will wind up with player situated on my page.  I do not want that.  Is it possible to use background?

                      Right now I haven't anything to show you as far a audio commands.  I have tried just about everything.  Suspect again it's just something stupid on my part.

                      squall_01



                        Prodigy

                        Thanked: 80
                        Re: Adding Background Music to HTML
                        « Reply #11 on: July 26, 2008, 07:30:22 PM »
                        Unless you code to be like that it shouldnt show up.  You mite be missing a < or > but its hard to say with out the page code posting.
                        Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                        If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                        Barnum

                          Topic Starter


                          Rookie

                          Re: Adding Background Music to HTML
                          « Reply #12 on: July 26, 2008, 07:44:35 PM »
                          Okay, let me ask this then.  If you were putting together a website using HTML, how would you write yours to have background music as soon as page opens?

                          The song I want to use is a french song called Bluesette, and it's located in My Documents, along with the photos I've used, etc..  I have used the EMBED SRC="Bluesette.mp3" notation as well as the BGROUND SRC="Bluesette.mp3"

                          squall_01



                            Prodigy

                            Thanked: 80
                            Re: Adding Background Music to HTML
                            « Reply #13 on: July 26, 2008, 08:00:02 PM »
                            <HTML>
                            <HEAD>
                            <TITLE></TITLE>
                            </HEAD>

                            <BODY>

                            <CENTER><IMG SRC=".jpg"></CENTER>

                            <embed src="c:/my documents/Bluesette.mp3" autostart="true" hidden="true" loop="true">

                            </BODY>
                            </HTML>

                            This is how I would code it an like I said is pulled from my pages.  I mite be not pointing to where your music file is but right click an say properties then at the location an key it in thats where it needs to be src.  The code above will repeat the song keep it hidden an not let the user see an defualt player, there are one that can be coded in but just so there is some user interface.  autostart will run it once the page opens/loads
                            Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                            If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                            Barnum

                              Topic Starter


                              Rookie

                              Re: Adding Background Music to HTML
                              « Reply #14 on: July 26, 2008, 08:10:43 PM »
                              Squall, I just must be out of my league.  I copied your suggestion and pasted it, and still nothing.  I guess I have to stop bothering you all, and take some classes or something.