The Wayback Machine - https://web.archive.org/web/20081201145136/http://www.webreference.com/html/tutorial12/8.html


spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / html / tutorials / 12 / 8

index123456789exercises1

Tutorial 12: Embed with HTML - Page 8

Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source
Page 1 Page 2 Page 3 Front Page

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.

Notice that all of the AREA elements have ALT attributes. Hence, a user agent that can't handle images can offer the different areas as a menu, using the alternate text to describe the options.

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:

<A HREF="./"><IMG SRC="example1.gif" USEMAP="#example"></A>

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:

<A HREF="/maps/contents.map"><IMG SRC="imagemap.png" 
   USEMAP="#mymap" ISMAP></A>

Client-side image maps have been around for quite a while and are supported by most browsers. Their use instead of server-side image maps is generally a good idea.

Embedding Java Applets using APPLET

The second element that you can use instead of OBJECT is APPLET, an element used for embedding Java applets in HTML pages.

The APPLET element

Context:
Inline element
Contents:
May contain block elements and PARAM elements
Tags:
Both start-tag and end-tag are required

Attributes for the APPLET element

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

index123456789exercises1

Produced by Stephanos Piperoglou

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Copyright 2008 Jupitermedia Corporation All Rights Reserved.

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A; with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Crucial Triples Up With New Three-Channel DDR3 Kits · Meet the Finalists: Excellence in Technology Awards · Tealeaf Offers Insight to Mobile Customer Behavior

URL: http://www.webreference.com/html/tutorial12/8.html

Created: May 28, 1998
Revised: February 25, 1999

Morty Proxy This is a proxified and sanitized view of the page, visit original site.