Designed for Firefox Browser and 1099x768

 

 

« Links open in new window/tab »

Monitor Page for Changes


It's private by ChangeDetection
Page copy protected against web site content infringement by Copyscape

Embedding Sound
PayneLess Designs

Simple and Easy to Do! (Do Not Recommend Using Embed Tag)

You can embed the sound on your site to auto play when the page loads or leave it to user to click Play button. Other options are:
1) set play in a continuous loop or play once only;
2) set how many times to play the sound/movie;
3) set how loud to play the sound;
4) set which sound control to display;
5) set if controls should be displayed;
6) set the object in a sound group with the sound to use;
7) set how far into the sound to start and stop;
9) set when to finish playing and many more. Many of these you may never use or need to use.

One of the HTML tags that plays music from a website is the <embed> tag. This tag has never been accepted by the W3C so you will always get a code error flagged on it after validating your web page.

Inside the embed tag, you need to define several things called attributes. Some you will not need to use at times. Always use lowercase to meet current HTML 4.01 Standards:

  1. src: URL of resource to be embedded
  2. width: Width of area in which to show resource
  3. height: Height of area in which to show resource
  4. align: How text should flow around the picture
  5. name: Name of the embedded object
  6. pluginspage: Where to get the plugin software
  7. pluginurl: Where to get the JAR archive for automatic installation
  8. hidden: If the object is visible or not
  9. href: Make this object a link
  10. target: Frame to link to
  11. autostart: If the sound/movie should start automatically
  12. loop: How many times to play the sound/movie
  13. playcount: How many times to play the sound/movie
  14. volume: How loud to play the sound
  15. controls: Which sound control to display
  16. controller: If controls should be displayed
  17. mastersound: Indicates the object in a sound group with the sound to use
  18. starttime: How far into the sound to start and stop
  19. endtime: When to finish playing

Here is a sample bit of code that has all of the attributes included. Notice there is no need for a closing </embed> tag. HTML Tidy will flag this if you put one in.:

This is a Flash example:

QuickTime example (playing from a web server):

QuickTime example (playing from a streaming server):

Windows Media Player example:

*** The correct way to embed audio, movies, flash, what have you, is to use the <object></object> tags. The <embed> tag is used in conjunction with the <object></object> tags to provide compatibility with some browsers. One solution, which is not a cure-all, is to use JavaScript to write the embed code for the player.

JavaScript Example for the Embed Tag:

If you have found any services on my site to be beneficial and would like to donate, please feel free to donate ANY amount you want. Thank you very much.

Return to Top
UPUP
DOWNDOWN

ICRA Checkout

Valid XHTML 1.0 StrictValid CSS!

Valid Robots.txt