embed Tag and attributes

embed Tag and attributes

t is the easiest way to add video or sound to a web page by including the <embed> tag. It causes the browser to include controls for the multimedia automatically and no need to have any ActiveX, Java VM, VBscript or JavaScript to support this <embed> tag.

The <noembed> tag is included to support browsers which don’t recognize the <embed> tag. For example, use <embed> to display a movie, and <noembed> to display a single JPG image as shown

<embed src=”/sound/sample.mid” width=”100%” height=”60″ >

<noembed><img src=”sample.jpg” ></noembed>

</embed>

Another example to play a flash file is

<embed src=”/flash/sample.swf” width=”100%” height=”250″ >

<noembed><img src=”image.jpg” alt=”image.jpg” /></noembed>

</embed>

Any media file can be given in src attribute. Other attributes of <embed> tag are

align – It determines how to align the object and has value of either center, left or right.

autostart – Indicates if the media should start automatically. Netscape default is true, Internet Explorer is 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). This is supported by Netscape only.

playcount – Specifies the number of times to play the sound. This is an option for loop if you are using IE.

hidden – Defines if object shows on web page. A false value means no and true means yes.

height – Height of the object in pixels.

width – Width of the object in pixels.

pluginspage – Specifies the URL to get the plug-in software.

name – A name used to reference the multimedia object to play.

src – URL of the object to be embedded. This can be any recognizable by the user’s browser. It could be .mid, .wav, .mp3, .avi, etc.

volume – Controls volume of the sound. Can be from 0 (off) to 100 (full volume). It is supported by Netscape only.

Get industry recognized certification – Contact us

Menu