HTML Music Codes
<h1>HTML Embedh1>
<p>Music is inserted onto a web page with the use of the <i>embedi> tag.
There are other ways to link to music, but embed is now considered the standard
for inserting media. Below is an minimalist example of the embed tag using the
<i>srci> attribute to define the media file's location. p>
<div class="codewrap"><h2 class="specialT">HTML Code:h2><pre class="code">
<embed src="beethoven.mid" /><br>
<p>Above is an embedded media player. To stop the music press stop/pause.
</p>
pre>div>
<p>Depending on what kind of media software you or your visitor has installed,
the above example will appear slightly different. To make your embedded player
display properly change the attributes associated with display.p>
<h1>Embed Attributes - Related to Displayh1>
<p>To customize the appearance of the embedded media player be sure to set the
following attributes.p>
<ul>
<li>width - the width of the media player.li>
<li>height - the height of the media playerli>
<li>hidden - if this value is true then the media player will not be displayed.
We recommend using this attribute only if you know that your visitors will not
want the option to stop the music that is playing on your web page.
(Values are true/false)li>
ul>
<div class="codewrap"><h2 class="specialT">HTML Code:h2><pre class="code">
<embed src="beethoven.mid" width="360" height="165" />
pre>div>
<h2 class="specialT">Embedded Music:h2><div class="display">
<embed src="beethoven.mid" width="360" height="165">
div>
<p>Usually, you do not want to mess with the width and height of the media
player as it can cause the media player to look rather distorted.p>
<h1>Embed Attributes - Related to Functionalityh1>
<p>To customize the functionality of the embedded media player be sure to
set the following attributes.p>
<ul>
<li>autostart - choose if the media file will start automaticallyli>
<li>loop - sets the media file to repeat or notli>
<li>volume - set the volume of the media file. The range is 0-100.li>
ul>
<div class="codewrap"><h2 class="specialT">HTML Code:h2><pre class="code">
<embed src="beethoven.mid" autostart="false" loop="false"
volume="60" />
pre>div>
<h2 class="specialT">Customize Your Code:h2><div class="display">
<embed src="beethoven.mid" autostart="false" loop="false" volume="60">
div>
<h1>Controls Attributeh1>
<p>The attribute <i>controlsi> sets which controls for the media player
will be displayed.p>
<ul>
<li>autostart - choose if the media file will start automaticallyli>
<li>loop - sets the media file to repeat or notli>
<li>volume - set the volume of the media file. The range is 0-100.li>
Comments