Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials How to Add a Soundfile in Your HTML File With the Sound Embed Tag

How to Add a Soundfile in Your HTML File With the Sound Embed Tag


How to Add a Soundfile in Your HTML File With the Sound Embed Tag You can add your own background music to your HTML page by adding the sound embed <EMBED> tag to it.The <EMBED> tag is the most common way of adding sound to a Web page. The sound embed tag is supported by both browsers, and PC and Mac platforms. The <EMBED> tag also features an interface , including a play, stop, and handle the sound button.

To embed music and have an interface to control the music you should put the code below in your body section. To make this work you must put the soundfile "sound.wav" in the root of your web site directory.

<HTML>
<HEAD>
<TITLE> Flash animations <TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<EMBED SRC="sound.wav" autostart="true" loop="true" HEIGHT="60" WIDTH="144"></EMBED>
</BODY>
</HTML>

To embed music without the interface you should use the following line of code.

<embed src="/img_articles/5678/sound.wav" autostart="true" loop="true" hidden="true" ></embed>


Author's URL: mix-fx.com
Learn HTML step-by-step from A to Z or improve your professional skills. More Tutorials: Featured Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com


Like us to: