Logo of aks.htmlplanet.com

Links
Play Intro
New Stuff
Home
Poems
Jokes
Quotes
Wallpapers
Learn HTML
-Getting Started
-What are tags ?
-Hex Codes
-Body Tag
-Font Tag
-Useful Tags
-Tables
-Adding Images
-Linking Pages
-Adding Sounds

Suggestion Book



















DigiArc :: Owned By Aakash Ashvin Shah

 .:: Welcome to aks.htmlplanet.com !





 .:: Learn HTML > Adding Sounds ...


.:: Important Instructions

  • You must have saw the Intro of this website ! If not click here. Now you see, how exiting it looks when there is a sound playing behind ?
  • But generally most of the websites don't have a sound playing in the background. The main reason are as follows :
    • The sound file is generally very large in size.
    • It makes the loading of the webpages slower.
    • Not all the formats of the sounds are supported.
    • Some people may not like the sound you have kept !
    .:: But if you don't have the above problems and you are sure that your webpages do not take much time to load, then you are free to add sounds to your website. Get on !

    .:: The Code

    .:: In the body section just add the following code :

    < Write all the neccesary codes here >
    < body >
    < bgsound src="file_name.extension" loop="1" >
    < /bgsound >

    < /body >
    < /html >

    .:: Understanding the code

  • src="..." : Denotes the source of the sound file.
  • file_name : Write the name of the sound file you want.
  • extension : Is the extension of the file like '.wav'. mp3 is not supported !
  • loop='x' : where x is the number of times you want the sound to play. Keeping x as '-1' will create an infinite loop which will play the sound endlessly and continuosly ! So go on, add your favorite sound.
    .:: That's all folks !



  • Learn HTML > Adding Sounds







     .:: Buck Up ! You can do it !