Developing Webs logo
Google
Web DW-Main DW-Photoshop
Visit the message board for solutions or post a question Check out the Classes offered for free at Developing Webs Voice Chat submit a tutorial, resources, article, font for publication consideration and earn a one way link back to your site Get more specifics about the Developing Webs Voice chat room and its room members View the current news at Developing Webs alternative sites which are resources for your d3evelopment needs Join Developing Webs Chat Link to us on your web page to help support this resource! Check out Developing Webs At yahoo groups! Developing Webs Home Adobe Photoshop Tutorials Macromedia Flash Tutorials Jasc Paint Shop Pro Tutorials Adobe Illustrator Animation basics Some Basic PHP tutorials Perl Tutorials HTML Tutorials Cascading Style Sheets javascript Front Page Tutorials Macromedia Dream Weaver Tutorials dreamweaver Publishing your site, FTP, ChMod, Promotions
RSS Newsfeed
for your site
DW News
Calendar
DW Forum
Right click on button and copy shortcut

Add to My Yahoo!

Reminder
Remember to book mark this site!



Request a Tutorial

HTML stands for HyperText Markup Language

Part 7: Adding Background Sound

To add sound as background music on your page, use the <embed src> tag. This tag has a few attributes to it. Let's look at them

1. The Embed tag: We will use our sample.mid from before in the hyperlink, but this time we will embed it.

<embed src="http://www.porshiana.com/sample.mid">

2. Attributes of the Embed tag: Some of the attributes are as follows:

  • volume="50%"---this adjusts the volume
  • hidden="true'---True if you want it play, false to let user play it
  • autostart="true"---true to automatically start, false to make the user click it
  • loop="3"---loops the song number of times in brackets, or continuously if you enter true
  • Height can also be used when allowing user control

3. Adding the Sound Code: Let's add this as our background sound, starting automatically, and give the user the option to stop it
Since the volume is also high, I will adjust it

<embed src="http://www.porshiana.com/sample.mid" volume="30%" hidden="false" autostart="true height="100" loop="true">

Add this code to your html




Save your HTML and Try out your new sound!

The page is looking good, but our links kind of run together.

When you are done, let's go to lesson 8, where we will  work on lists
 



"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2024 All Rights Reserved
Privacy and Legal