Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

The <embed> Tag 405

14


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 attri-
bute of the tag.) The height and width attributes specify the dimensions of the
embedded file in pixels.


Table 14.3 summarizes the attributes that are part of HTML5.


TABLE 14.3 Attributes


Attribute Description


height The height of the element.


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.


There are also some other attributes that only Internet Explorer supports. If you need to
support older versions of Internet Explorer, consider using the nonconforming attributes
in Table 14.4 to improve embedded videos for that browser.


TABLE 14.4 Attributes of Internet Explorer


Attribute Description


allowfullscreen Specifies whether the embedded element can occupy the full screen.
Values are true and false.


allowscriptaccessDetermines 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.


plug-inspage The URL of the page where you can download the plug-in used to
view this object.


The bottom line on is that you shouldn’t use it. I’ve included it here because
you’ll probably see it on other sites, but there are better ways to embed media into a web
page.