HTML Embed
0 5448
Sometimes you want to add video or music into your web page. The simplest way to add video or music to your web page is to include the embed HTML tag. It's a special tag, because the browser itself adds the controls for the multimedia automatically offered browser supports <embed> tag and given media file.
You can also add a <noembed> tag to the browsers, which don't recognize the <embed> tag. You could, for instance, use <embed> to show a movie of your choice, and <noembed> to show a single JPG image, if browser does not support the <embed> tag.
<embed src="flyingsnail1.swf">
<noembed> <img src="logo.jpg" > </noembed>
</embed>
This element is used for swf file.
The <embed> Tag Attributes
See the list of essential attributes of <embed> tag.
align - Determines how to line up the object. It can be located to left, center or right.
autostart - This attribute shows, if the media should play automatically. You can fix it either true or false.
loop - It specifies, if the sound should be started continuously, a certain number of times or not at all.
playcount - It specifies the number of times to play the music. This is an alternate attribute for loop if you are using Internet Explorer.
hidden - It specifies, if the multimedia file should be displayed on the page. A true value means yes and false value means no.
width - It specifies the width of the object in pixels.
height - It specifies the height of the object in pixels.
name - It specifies a name used to reference the object.
src - It specifies the URL of the object to be implanted.
volume - It specifies to control the volume of the sound.
Supported Video Types
You can access many types of media files like AVI's (.avi), Flash movies (.swf), and MOV's (.mov) file types inside the embed tag.
.swf files - These files are the file types made by Macromedia's Flash program.
.wmv files - These files are Microsoft's Window's Media Video file types.
.mov files - These files are Apple's Quick Time Movie format.
.mpeg files - These files are movie files made by the Moving Pictures Expert Group.
Example 1: Embed with height and width:
<embed src="flyingsnail1.swf" width="200" height="100">
<noembed> <img src="logo.jpg"> </noembed>
</embed>
Example 2: Embed with autostart:
<embed src="flyingmachine.swf" width="200" height="100" autostart="true" >
<noembed> <img src="logo.jpg" > </noembed>
</embed>
Example 3: Embed with volume:
<embed src="flyingmachine.swf" width="200" height="100" autostart="true" volume="60" >
<noembed> <img src="logo.jpg" > </noembed>
</embed>
This embed tag supports to all browsers : Google Chrome, Internet Explorer, Firefox, Opera, Safari etc.
Share:
Comments
Waiting for your comments