HTML Music codes

Started by thiruvasagamani, Aug 19, 2008, 03:33 PM

Previous topic - Next topic

thiruvasagamani

HTML Music Codes

Inserting music onto a web page is relatively easy. In the past multiple tags had to be used because browsers did not have a uniform standard for defining embedded media files. However, I am glad to announce that this is a problem of the past and you will have a much easier time then webmasters of the past.

HTML Embed

Music is inserted onto a web page with the use of the embed 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 src attribute to define the media file's location.
HTML Code:

<embed src="beethoven.mid" />

<p>Above is an embedded media player.  To stop the music press stop/pause.</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.

Embed Attributes - Related to Display

To customize the appearance of the embedded media player be sure to set the following attributes.

    * width - the width of the media player.

    * height - the height of the media player

    * 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)


HTML Code:

<embed src="beethoven.mid" width="360" height="165" />
Thiruvasakamani Karnan