Tutorial 12: Embed with HTML - Page 8 - HTML with Style
Tutorial 12: Embed with HTML - Page 8
The first area is a circle. The first two co-ordinates specify the center of the circle, and the third is the radius of the circle. The second area is a rectangle. The first two co-ordinates specify the top left corner of the rectangle, and the other two co-ordinates specify the bottom right corner. The third area is a polygon. Every two co-ordinates specify a point that makes up the polygon. The fourth area is the default area, that is, any part of the image that isn't part of another area.
What about user agents that can't understand client-side image maps at all? The HTML 4.0 specification recommends putting some content inside the MAP element for those browsers to render as an alternative to the image map, but in practice both Internet Explorer and Navigator will render this content even though they understand image maps. The best you can do is to still use an A attribute to make the image a hyperlink pointing to some default location. So our image would be something like this:
Now browsers that support image maps will ignore this link and use the image map instead (as a matter of fact, if you haven't specified a default area in your image map, they'll try this link instead when the user clicks outside of the specified areas). But older browsers will follow the link and presumably do something reasonable. If you're completely paranoid, you can even give the element an ISMAP attribute and make the hyperlink point to a server-side image map. This way, if the user agent doesn't support client-side image maps but does support server-side image maps, it will use the server-side image map instead. You can accomplish this with a syntax like the following:
- Inline element
- May contain block elements and PARAM elements
- Both start-tag and end-tag are required
- code (URI)
- The location of the applet's class file.
- codebase (URI)
- The base URI used to resolve the URI specified in the code and archive attributes, if it is different from the document's base URI.
- archive (URI list)
- This space-separated list of URIs pointing to Java archives (JAR files) that contain class files and data used by the applet.
- name (ID)
- Used to give an applet a unique name, which allows several applets on the same page to communicate with each other.
- Object presentational attributes
- Alternative text attributes
- Identifier and classification attributes
- Title attribute
- Inline style information attribute
- Intrinsic event handler attributes
Produced by Stephanos Piperoglou
Created: May 28, 1998
Revised: February 25, 1999