HTML and CSS Reference
In-Depth Information
The <embed> Tag
The <embed> element has been added to HTML5, mainly as a recognition that it has been
in wide use since Netscape created it when it added plug-in support to their browser.
Browsers continue to support it, mainly because many pages out there still use it. The
default YouTube embed code includes the <embed> tag.
First, let's look at the required attributes of the <embed> element:
<embed src=“a01607av.avi” height=“120” width=“160”
type=”application/x-shockwave-flash” />
The src attribute contains the location of the multimedia file you want to embed in the
web page. The type attribute contains the content type. (It's the same as the type
attribute of the <object> tag.) The height and width attributes specify the dimensions of
the embedded file in pixels.
Table 12.3 summarizes the <embed> attributes supported by Internet Explorer.
TABLE 12.3 <embed> Attributes
Attribute
Description
allowfullscreen
Specifies whether the embedded element can occupy the full
screen. Values are true or false .
allowscriptaccess
Determines whether the embedded object can communicate with
external scripts or link to external pages. Values are always ,
samedomain , and never .
flashvars
Used to pass configuration parameters to the Flash player. Only
used if the embedded object is Flash.
12
height
The height of the element.
plug-inspage
The URL of the page where you can download the plug-in used to
view this object.
src
The URL of the multimedia file.
type
The MIME type of the multimedia file indicated by the src
attribute.
width
The width of the element.
Finally, you can include the noembed element to provide support for visitors who do not
have a web browser that can display plug-ins:
<noembed> This Web page requires a browser that can display objects. </noembed>
<embed src=“a01607av.avi” height=“120” width=“160” />
 
 
 
Search WWH ::




Custom Search