HTML and CSS Reference
In-Depth Information
N
OTE
HTML5 defines a number of
rel
values for
<area>
. See the earlier “<a> (Anchor)” section
for a list of the values used with the
rel
attribute.
shape
This attribute defines the shape of the associated hot spot. HTML 4 defines the
values
rect
, which defines a rectangular region;
circle
, which defines a circular region;
poly
, which defines a polygon; and
default
, which indicates the entire region beyond any
defined shapes. Many browsers, notably Internet Explorer 4 and higher, support alternate
values for shapes, including
circ
,
polygon
, and
rectangle
.
target
This attribute specifies the target window for hyperlink-referencing frames. The
value is a frame name or one of several special names. A value of
_blank
indicates a new
window. A value of
_parent
indicates the parent frame set containing the source link.
A value of
_self
indicates the frame containing the source link. A value of
_top
indicates
the full browser window.
type
This attribute specifies the media type in the form of a MIME type for the link target.
Generally, this is provided strictly as advisory information; however, in the future a browser
might add a small icon for multimedia types. For example, a browser might add a small
speaker icon when
type
is set to
audio/wav
. For a complete list of recognized MIME types,
see www.w3.org/TR/html4/references.html#ref-MIMETYPES. The attribute is commonly
understood for the
a
element but was introduced by HTML5 to image maps.
Examples
<map id="primary" name="primary">
<area shape="circle" coords="200,250,25" href="another.html">
<area shape="default" nohref>
</map>
<!-- XHTML syntax -->
<map id="secondary" name="secondary">
<area shape="rect" coords="10,10,100,100" href="another.html" />
<area shape="default" nohref="nohref" />
</map>
Compatibility
HTML 2, 3.2, 4, 4.01, 5
XHTML 1.0, 1.1
Firefox 1+, Internet Explorer 2+,
Netscape 1+, Opera 4+, Safari 1+
Notes
• As an empty element under XHTML or when using XML-style syntax for HTML5,
a trailing slash is required for this element:
<area />
.
• HTML5 does not define
rev
attribute for
<area>
tags.
• Netscape 1-level browsers do not understand the
target
attribute as it relates to
frames.
• HTML 3.2 defines only
alt
,
coords
,
href
,
nohref
, and
shape
.