Hello dear readers! welcome to this section of my tutorial, in this post am going to be talking about how to embed various multimedia files such as videos and audios into a HTML web page.
Sometimes you need to add music or video into your web page. The best and easiest way to do that is by including the special Html tag called <embed> tag, this Html tag causes the web browser itself to automatically include controls for the multimedia files provided the browser supports <embed> tag and given media type.
You can include the <nonembed> tag for web browsers that do not support the <embed> tag. For example, you could use <embed> to display a movie of your choice, and then <nonembed> to display a single JPG image if the browser does not support <embed> tag.
Here is a brief example on how to play an embed midi file on your web page:
Try the above code out with an actual URL of your media files.
The <embed> Tag Attributes
Following is the list of the important attributes which can be used with <embed> tag.
|Sr.No||Attribute & Description|
Supported Video Types
You can use various media types like flash movies (.swf), AVI's (.avi) and MOV's (.mov) file types inside embed tag.
.swf files - These are the file types created by Macromedia's Flash program.
.wmv files - These are microsoft Window's Media Video file types.
.mov files - These are the Apple's Quick Time Movie format.
.mpeg files - These are movie files created by the Moving Picture Expert Group.
RECOMMENDED: Html Image Links
You can also try the above code out for better understanding and feel free to ask your questions.
You can use the Html <bgsound> tag for playing a soundtrack or clip in the background of your webpage. This tag is supported by internet explorer only and most of the other browsers ignore this tag. Its downloads and plays an audio file when the host document is first downloaded by the user and displayed. The background sound file also will replay whenever the user refreshes the browser.
This tag having only two attributes which are loop and src. Both of these attribures have the same meaning as the once i explained above.
Let us take a look at a very brief example on how to play a small midi file.
HTML Object tag
Html 4 makes available <object> element, which offers to its users an all-purpose solution to a generic object inclusion. It allows authors to specify everything that is required by an object(obj) for its presentation by a user agent.
RECOMMENDED POST: Html Introduction
Below are few examples:
You can embed a HTML document in a HTML document it self as follows:
In this case the attribute will come into picture if the browser does not support object tag.
You can embed a PDF document in a HTML document as follows:
Some parameters that are related to the document can be specified using the <param> tag. Below is a simple example to embed a wav file:
RECOMMENDED: Html Text Links
You can add a flash document as follows:
You can add a java applet into a Html document as follows:
Well that is it on this tutorial, see you on my next tutorial and don't forget to subscribe to our email list, bye for now.