CyberArmy University | Open Source Institute | CyberArmy Intelligence & Security | CyberArmy Privacy Watch Initiative

[HTML] Adding Sounds into your Web Page



    [HTML] Adding Sounds into your Web Page [View] [Reply] [Top]
    Posted by Author theeye On 2007-04-29 10:02:36
    View and vote on the article here: Adding Sounds into your Web Page


    Adding Sounds into your Web Page

    Category
    HTML
    Summary
    Body
    Adding Sounds into your Web Page

    By theeye



    How to add Sounds into your Home Page


    So, you find your webpage a little bit boring or you want to add more excitement into it. Adding sounds or music to your home page might be the answer to your problems.

    In this topic, we add another tag to our pool of knowledge. This is the <EMBED> tag. Netscape's <EMBED> tag supports many common file formats such as wav, au, and mid. Adding sounds to your web page is pretty simple. The basic structure of the tag is:
    <EMBED SRC="filename.mid" width=x height=x autostart=x hidden=x loop=x>

    * If you want to automatically play the music when the webpage is loaded, set autostart=true.

    * If, however, you don't want your music to automatically play, set autostart=false or just leave out autostart attribute.

    * You can also have a control box if you want. If you don't want that control box to be seen, just set hidden=true.

    * By setting loop=true, it will make the music just play over and over and over again. Just like the song over and over again. That's a pretty good song! Try putting it in your webpage! hehehe...:)

    The recommended size for the control box is width=145, height=60. But your webpage is still in your hands. You can also make a number of your choice. Let me also remind you that these numbers are measured in pixels. You may also find that a portion of the control box is cut. Don't panic! That's because you set the number of the width and height less than the recommended value, which is 145 X 60 pixels. Here is one example:

    <EMBED SRC="My Sacrifice.mid" width=145 height=60 loop=true>

    In this example, we left the autostart attribute alone. We didn't even write it! So you have to click the play button in the control box to make it start.

    To finish it off, it's not recommended to set more than one <EMBED> tag within your page. Also, try to avoid using .wav or .au files as much as possible because these are very large files that the browser will have to take time to download. However, that's none of my business anymore isn't it? hehe.... okay?!? enjoy!


    Written by theeye, Member Of Knowledge Bank Tutorial Writers

    Edited by NeorageX

    February 28,2005


    This article was imported from the CyberArmy University site. (original author: theeye)
     


CyberArmy::Forum v0.6
Generated In 0.02509 seconds


About Us | Privacy Policy | Mission Statement | Help