Step 3 - Create HTML Code (Cont.) |
Add Sound To Your Page |
|
To add sound to a Web page you need to: |
|
The most popular sound files used today for Web pages are files that end with an extension of .au (audio format sound file), .wav (Windows wave format sound file), and .mid (Midi format sound file). The To add sound to a Webpage, place the code below on your page between your <head> </head> Tags. |
|
<embed src="town.mid" autostart="true" hidden="true" loop="false"> |
Change town.mid to your file name.
|
The HTML Tag (Attribute) and a Description of what each tag does is discussed below: |
| HTML Tag (Attribute) | Description |
SRC="URL" |
"town.mid" The URL of your sound file. (Sound files can be in
any recognizable format. For example, "midi, wav,
au". |
AUTOSTART="true"|"false" |
"true" Indicates if the sound track should start
automatically upon loading. A "true" value means it
should, a "false" value means it should not. The
Explorer's default is "false" while Navigator's one
is "true". The default on the Mac is
"false" for both browsers. |
HIDDEN="true"|"false" |
hidden="true" Specifies if the embedded object is visible.
HIDDEN="false" or hidden HIDDEN="true".
The default is HIDDEN="false". |
LOOP="true"|"false". |
"false". Specifies if the sound should be played continuously
LOOP="true" or should not be repeated
LOOP="false". You may get continuous sound on older
versions of Explorer. |
|
Caution: Some visitors may find embedded sound to be a
distraction. Think carefully about whether you really need to use
embedded sound. A link to a sound file that your visitor can
select, may be better. See the code below for an example:
For information on MP3 sounds visit this page. To locate your free sound effects visit Boogie Jac. For information on recording your own computer music visit synthzone.com. Take a course in recording digital music. |
|
| Search | Map | About this site | Privacy | Glossary | What's new? | |