The Wayback Machine - https://web.archive.org/web/20081202142959/http://www.webreference.com:80/html/tutorial12/5.html


spacer

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

home / experts / html / tutorials / 12 / 5

index123456789exercises1

Tutorial 12: Embed with HTML - Page 5

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

Other than alternate content, the OBJECT element can also contain any number of PARAM elements. These elements are used to supply parameters to the applet or program being embedded, if these are required. The specific number and type of parameters needed depends on the object you're embedding. Java applets make heavy use of parameters. For instance, a Java applet that plays a sound file might require a parameter that supplies the URI of the sound file.

The PARAM element

Context:
Can only appear inside OBJECT and APPLET elements
Contents:
Empty element
Tags:
Empty element. THe start-tag is required and the end-tag is forbidden.

Attributes for the PARAM element

name (text)
The name of the parameter.
value (text)
The value of the parameter.
valuetype (value type)
The type of the value specified. This can either be data, in which case it's just textual data, ref, in which case the value is a URI, or object, in which case the value is a pointer to another OBJECT element in the document. The details of these values depend on the type of object you're using.
type (content type)
If valuetype is ref, specifies the MIME content type of the resource specified by the parameter value.
Identifier and classification attributes

Using OBJECT for embedding applets and other programs into Web pages is still a rather theoretical endeavor, as the HTML specification leaves the details to be largely implementation-dependent. Since this doesn't actually work yet, I won't go into it quite yet. Instead, let's forget about OBJECT for now and concentrate on the more real-world alternatives: IMG and APPLET.

The IMG element

The IMG element

Context:
IMG is an inline element.
Contents:
IMG is an empty element.
Tags:
Empty element. Start tag is required, end tag is forbidden.

Attributes for the IMG element

src (URI)
The location of the image.
longdesc (text)
A long description of the image.
Alternative text attributes
Attributes for specifying image maps
Object presentational attributes
Identifier and classification attributes
Title attribute
Language information attributes
Inline style information attribute
Intrinsic event handler attributes

Alternative text attributes

alt (text)
Text that should be displayed by the user agent if the element itself cannot be rendered.

The IMG element is used to embed images in HTML documents. The SRC attribute gives the image's location. It's really as simple as that.

The ALT attribute provides a mean to set alternate text for the image, much like to contents of the OBJECT element. The problem with this method is that the alternate content can only be text. Hence, you cannot have the complicated set of alternatives we saw in our previous example. You can also specify the LONGDESC attribute that gives a long description for the image that user agents could make available to the user if they can't display the image. Here's our example using IMG instead of OBJECT:

<H1><IMG SRC="acmelogo.foo" ALT="Acme Computer Corp."> Q3
Results</H1>

<P>Our third-quarter results are out. The cocktail party to celebrate
was just as successful as Q3 itself. Here's a picture of our beloved
CEO, Dr. Propellerhead, with the VP for Marketing:</P>

<P><IMG SRC="arnyandstan.foo"
ALT="A picture of Arny and Stan smiling for the camera."></P>

<P>The data below shows that our Transfirbulation department has been
making some good progress:</P>

<P>
<IMG
 SRC="piechart.foo"
 ALT="Third quarter earnings by department"
 LONGDESC="A pie chart showing Q3 earnings broken down by
department. The data shows that the Transfirbulation department was
responsible for almost 75% of all earnings this quarter."
>
</P>

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/5.html

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

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