HTML and CSS Reference
In-Depth Information
Because we have no need to distinguish between the setter applets, we
choose not to identify their instances. The shapes and usemap attributes
Recall from our detailed discussion of hyperlinks in Chapter 6 that you
can divide a picture into geometric regions and attach a hyperlink to
each, creating a so-called image map. The shapes and usemap attributes
for the <object> tag generalize that feature to include other object types.
The standard shapes attribute informs the browser that the <object>
tag's contents are a series of hyperlinks and shape definitions. The
usemap attribute and required URL value point to a <map> where you
define the shapes and associated hyperlinks, identical to the client-side
image maps discussed in section 6.5.2 .
For example, here is the image map we described in Chapter 6 , rewrit-
ten in XHTML as a "shaped" object:
<object data="pics/map.gif" shapes="shapes">
<a shape="rect" coords="0,0,49,49" href="main.html#link1"></a>
<a shape="rect" coords="50,0,99,49" href="main.html#link2"></a>
<a shape="rect" coords="0,50,49,99" href="main.html#link3"></a>
<a shape="rect" coords="50,50,99,99" href="main.html#link4"></a>
and as the more familiar image map:
<object data="pics/map.gif" usemap="#map1">
<map name="map1">
<area coords="0,0,49,49" href="main.html#link1" />
<area coords="50,0,99,49" href="main.html#link2" />
Search WWH ::

Custom Search