HTML 5 EMBED TAG
EMBED TAG The <embed> Tag Attributes Following is the list of important attributes which can be used with <embed> tag. Attribute Description align Determines how to align the object. It can be set to either center, left or right. autostart This boolean attribute indicates if the media should start automatically. You can set it either true or false. loop Specifies if the sound should be played continuously (set loop to true), a certain number of times (a positive value) or not at all (false) playcount Specifies the number of times to play the sound. This is alternate option forloop if you are usiong IE. hidden Specifies if the multimedia object should be shown on the page. A false value means no and true values means yes. width Width of the object in pixels height Height of the object in pixels name A name used to reference the object. src URL of the object to be embedded. volume Controls volume of the sound. Can be from 0 (off) to 100 (full volume). 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 - are the file types created by Macromedia's Flash program. • .wmv files - are Microsoft's Window's Media Video file types. • .mov files - are Apple's Quick Time Movie format. • .mpeg files - are movie files created by the Moving Pictures Expert Group. <!DOCTYPE html> <html> <head> <title>HTML embed Tag</title> </head> <body> <embed src="/html/yourfile.swf" width="200" height="200" > <noembed><img src="yourimage.gif" alt="Alternative Media" ></noembed> </embed> </body> </html> This will produce following result: Background Audio You can use HTML <bgsound> tag to play a soundtrack in the background of your webpage. This tag is supported by Internet Explorer only and most of the other browsers ignore this tag. It 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 is having only two attributes loop and src. Both these attributes have same meaning as explained above. Here is a simple example to play a small midi file: <!DOCTYPE html> <html> <head> <title>HTML embed Tag</title> </head> <body> <bgsound src="/html/yourfile.mid"> <noembed><img src="yourimage.gif" ></noembed> </bgsound> </body> </html>

No comments:
Post a Comment