Welcome to Our Free Tutorial!

HTML Music & Videos

HTML - Music Codes

If you want to insert music onto a web page it is easy to use. In the past multiple tag had used because browsers did not have embedded media files.

Music is inserting onto a web page with the use of the < embed> tag. There are many way to inserting music file but it is easy way to insert.

HTML Code:
<embed src="song.mid" />
Embed Attributes- Related to Display media player the following attributes.
1. width - the width of the media player.
2. height - the height of the media player.
3. hidden - if this value is true then the media player will not be displayed.

<embed src="geet.mid" width="360" height="165" />


Related to Media Player Functionality use the following functionality of the embedded media plyer

1. autostart - choose if the media file will start automatically
2. loop - sets the media file to repeat or not
3. volume - set the volume of the media file. The range is 0-100.

<embed src="geet.mid" autostart="false" loop="false" volume="60" />


HTML - Video Codes

If you want to use Videos on your site embedded into your html web pages. There are different way to inserting. One method is to use the <embed/> tag to display media file. The embed tag does not have closing tag. It is similar to the image tag. The src attribute must be define the correct URL (Local Or Global).

HTML Code:

<embed src="path of media file " autostart="false" />


HTML Video Media Type

Flash movies (.swf), AVI's (.avi), and MOV's (.mov) file types are supported by the embed tag.
1. .mov files - are Apple's Quick Time Movie format.
2. .swf files - are the file types created by Macromedia's Flash program.
3. .mpeg files - set the standard for compression movie files created by the Moving Pictures Expert Group.
4. .wmv files - are Microsoft's Window's Media Video file types.