aspxtreme

EMBED Element | EMBED Object

HTML Elements/DHTML Objects


Netscape® Navigator® 2.0 and Internet Explorer® 3.02 and later only.

Embeds an external object or file that is run by a plug-in.

HTML Syntax

Remarks

A plug-in is an application that acts as an extension to the native capabilitities of the Web browser. Users need to have the appropriate plug-in installed before they can see the results of running an embedded file that uses a plug-in.

The EMBED element must appear inside the BODY of the document. The output is displayed as part of the HTML document in a rectangular area of the page when the plug-in is loaded. This is similar to the way a GIF or JPEG image is embedded, except that the plug-in can be live and respond to user events, such as mouse clicks.

The EMBED object needs either the src attribute that specifies the file to run, or the type attribute that specifies the MIME type of the plug-in needed to run the file. Browsers use either the suffix of the filename given as the src, or the value of the type attribute to determine which plug-in to use. In Netscape® Navigator, the height attribute is also required.

If a user opens a Web document that uses an EMBED tag, and the plug-in needed by the EMBED tag is already installed, the results of running the embedded file are displayed automatically.

If the plug-in is uninstalled, the browser asks if the user wants to install the plug-in. If the user ignores the prompt to load the plug-in, the browser displays a puzzle piece in the space reserved for the embedded file. The user can click on this at any time to get the Plug-in Finder page. This page takes the MIME type and file extension for the plug-in and tries to match it to available MIME handlers on the web site.

In addition to these standard attributes, plug-ins can optionally have private attributes to communicate specialized information between the HTML page and the plug-in code. Browsers normally ignore nonstandard attributes when parsing the HTML. It passes all attributes to the plug-in, allowing the plug-in to examine the list for any private attributes that could modify its behavior.

The NOEMBED element ( Netscape® Navigator® only ) can be used to display alternative text for browsers that cannot display plug-ins.

Members



Styles

The following example embeds an audio object in the document, hides and loops the source object continuously.

<embed src="../shared/space.au" hidden loop=-1></embed>
See Also

APPLET, OBJECT



Books and more ...

Contents
HTML Elements / DOM Objects
HTML Element Attributes
CSS Attributes
DOM Object Properties
DOM-compliant Events Reference
DOM Methods Reference
DOM Collections Reference
 


Suggested Reading



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme