image map
Sign in to savemethod of adding links to parts of an image
Described at
HTML Standard
html.spec.whatwg.org →The map element, in conjunction with an img element and any area element descendants, defines an image map . The element represents its children. The areas attribute must return an HTMLCollection rooted at the map element, whose filter matches only area elements. An area element with a parent node must have a map element ancestor. If the area element has an href attribute, then the area element represents a hyperlink . In this case, the alt attribute must be present. It specifies the text of the hyperlink. Its value must be text that, when presented with the texts specified for the other hyperlinks of the image map , and with the alternative text of the image, but without the image itself, provides the user with the same kind of choice as the hyperlink would when used without its text but with its shape applied to the image. The alt attribute may be left blank if there is another area element in the same image map that points to the same resource and has a non-blank alt attribute. If the area element has no href attribute, then the area represented by the element cannot be selected, and the alt attribute must be omitted. circle Circle state Designates a circle, using exactly three integers in the coords attribute. circ No default Default state This area is the whole image. (The coords attribute is not used.) poly Polygon state Designates a polygon, using at-least six integers in the coords attribute. polygon No rect Rectangle state Designates a rectangle, using exactly four integers in the coords attribute. rectangle No The attribute's missing value default and invalid value default are both the rectangle state. The coords attribute must, if specified, contain a valid list of floating-point numbers . This attribute gives the coordinates for the shape described by the shape attribute. The processing for this attribute is described as part of the image map processing model. In the circle state, area elements must have a coords attribute present, with three integers, the last of which must be non-negative. The first integer must be the distance in CSS pixels from the left edge of the image to the center of the circle, the second integer must be the distance in CSS pixels from the top edge of the image to the center of the circle, and the third integer must be the radius of the circle, again in CSS pixels . In the default state, area elements must not have a coords attribute. (The area is the whole image.) In the polygon state, area elements must have a coords attribute with at least six integers, and the number of integers must be even. Each pair of integers must represent a coordinate given as the distances from the left and the top of the image in CSS pixels respectively, and all the coordinates together must represent the points of the polygon, in order. In the rectangle state, area elements must have a coords attribute with exactly four integers, the first of which must be less than the third, and the second of which must be less than the fourth. The four points must represent, respectively, the distance from the left edge of the image to the left side of the rectangle, the distance from the top edge to the top side, the distance from the left edge to the right side, and the distance from the top edge to the bottom side, all in CSS pixels . When user agents allow users to follow hyperlinks or download hyperlinks created using the area element, the href , target , download , and ping attributes decide how the link is followed. The rel attribute may be used to indicate to the user the likely nature of the target resource before the user follows the link. The IDL attribute referrerPolicy must reflect the referrerpolicy content attribute, limited to only known values . 1. Parse the attribute's value using the rules for parsing a hash-name reference to a map element, with the element as the context node. This will return either an element (the map) or null. 2. If that returned null, then return. The image is not ass
Excerpt from a page describing this subject · 37,826 chars · not written by Vinony
Wikidata facts
Show 4 more facts
- Stack Exchange tag
- stackoverflow.com/tags/imagemap
- media type
- application/x-httpd-imap
- described at URL
- html.spec.whatwg.org/multipage/image-maps.html#image-maps
- P13411
- north
Sources (2)
via Wikidata · CC0