<Related pages> | ||
| ||
Because a client-side image map doesn't use an additional request from the server to execute the link I would prefer to use this in favor of the server-side image map. Another advantage is that the browser can act on the position of the mouse over an active area, to show the address of the link in the status bar or activate a script.
If two or more AREA's overlap, the region defined first in the map definition takes precedence over subsequent regions. The AREA element is only valid inside the MAP element.
<!ELEMENT AREA - O EMPTY -- client-side image map area --> <!ATTLIST AREA %attrs; -- %coreattrs, %i18n, %events -- shape %Shape; rect -- controls interpretation of coords -- coords %Coords; #IMPLIED -- comma separated list of lengths -- href %URI; #IMPLIED -- URI for linked resource -- nohref (nohref) #IMPLIED -- this region has no action -- alt %Text; #REQUIRED -- short description -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- >from the HTML 4.0 DTD, "Copyright © W3C, (MIT, INRIA, Keio). All Rights Reserved."
Shape | Coordinates | Explanation |
---|---|---|
CIRCLE | X,Y,Radius | Define a circle with X,Y as the center and given radius. |
POLY | X1,Y1,X2,Y2...,Xn,Yn |
Define a polygon with n points, using an X,Y pair for each point of the
polygon. The polygon is not automatically closed, so include the starting point again as the last point to close the polygon. |
RECT | Left,Top,Right,Bottom | Define a rectangle with upper-left corner (Left,Top) and lower-right corner (Right,Bottom). |
The upper-left corner of the image is (0,0).
In HTML 3.2 you can supply all the values with a percent sign as a suffix to let the values be interpreted as percentages of the image's width and height.
<protocol>://<host>:<portnumber><path><anchor>?<parameters>
protocol
protocol | Usage |
---|---|
http | Hypertext Transfer Protocol, for World Wide Web pages |
ftp | File Transfer Protocol, for downloading and uploading files |
news | Reading and posting messages to newsgroups |
gopher | Menu like information system, used before the WWW got popular. |
telnet | Remote login on another computer |
host
portnumber
path
anchor
parameters
If you want to link to an anchor which has been created with the NAME attribute, Add the character # followed by the name of the anchor to the link. By using only the #<NAME> syntax as the destination of the link you can link to a specific position with the current document. This can be used for things like a table of contents.
Value | Shape |
---|---|
DEFAULT | The areas on the map not covered by a shape. |
CIRCLE / CIRC | Circle. |
POLYGON / POLY | Polygon. |
RECTANGLE / RECT | Rectangle. |
If the SHAPE attribute is omitted shape="rect" is assumed.
Magic TARGET names
These names all begin with the underscore character. Any targeted window name
beginning with underscore which is not one of these names, will be ignored.
Value | Description |
---|---|
_blank | This target will cause the link to always be loaded in a new blank window. This window is not named. |
_self | This target causes the link to always load in the same window the anchor was clicked in. This is useful for overriding a globally assigned BASE target. |
_parent |
This target makes the link load in the immediate FRAMESET parent of this
document. This defaults to acting like _self if the document
has no parent.
|
_top |
This target makes the link load in the full body of the window. This
defaults to acting like _self if the document is already at the
top. It is useful for breaking out of an arbitrarily deep FRAME nesting.
|
<MAP name="area">
|