HTML and CSS Reference
In-Depth Information
graphical browsers may use it to present the client-side image map as a
list of links identified by the alt labels.
6.5.4.2. The coords attribute
The required coords attribute of the <area> tag defines coordinates of a
mouse-sensitive region in a client-side image map. The number of co-
ordinates and their meanings depend upon the region's shape as de-
termined by the shape attribute, discussed later in this chapter. You may
define hyperlink regions as rectangles, circles, and polygons within a
client-side image map.
The appropriate values for each shape include:
circle or circ
coords=" x , y , r " , where x and y define the position of the center of
the circle (0,0 is the upper-left corner of the image) and r is its ra-
dius in pixels.
polygon or poly
coords=" x1 , y1 , x2 , y2 , x3 , y3 ,..." , where each pair of X,Y coordinates
defines a vertex of the polygon, with 0,0 being the upper-left
corner of the image. At least three pairs of coordinates are required
to define a triangle; higher-order polygons require a larger number
of vertices. The polygon is automatically closed, so it is not neces-
sary to repeat the first coordinate at the end of the list to close the
region.
rectangle or rect
coords=" x1 , y1 , x2 , y2 " , where the first coordinate pair is one corner
of the rectangle and the other pair is the corner diagonally oppos-
ite, with 0,0 being the upper-left corner of the image. Note that a
rectangle is just a shortened way of specifying a polygon with four
vertices.
 
Search WWH ::




Custom Search