News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

APPLETS - Specifying Alternate HTML Code and Text

Started by sukishan, Jul 15, 2009, 02:13 PM

Previous topic - Next topic

sukishan

Note the ellipsis points (". . .") in the previous HTML example. What did the example leave out? It omitted alternate HTML code — HTML code interpreted only by browsers that don't understand the <APPLET> tag. Alternate HTML code is any text that appears between the <APPLET> and </APPLET> tags, after any <PARAM> tags. Browsers enabled with Java technology ignore alternate HTML code.
To specify alternate text to browsers enabled with Java technology and other browsers that understand the <APPLET> tag, use the ALT attribute. If the browser can't display an applet for some reason, it can display the applet's ALT text.

We use alternate HTML code throughout the online version of this tutorial to tell readers about the applets they're missing. Often, the alternate HTML code includes one or more pictures of the applet. Here's the complete HTML code for the Animator example shown previously:

<APPLET CODE="Animator.class" WIDTH=460 HEIGHT=160
ALT="If you could run this applet, you'd see some animation">
<PARAM NAME="imageSource" VALUE="images/Beans">
<PARAM NAME="backgroundColor" VALUE="0xc0c0c0">
<PARAM NAME="endImage" VALUE=10>
<PARAM NAME="soundSource" VALUE="audio">
<PARAM NAME="soundtrack" VALUE="spacemusic.au">
<PARAM NAME="sounds"
       VALUE="1.au|2.au|3.au|4.au|5.au|6.au|7.au|8au|9.au|0.au">
<PARAM NAME="pause" VALUE=200>
Your browser is completely ignoring the &lt;APPLET&gt; tag!
</APPLET>

A browser that does not understand the <APPLET> tag ignores everything in the previous HTML code except the line that starts with "Your". A browser that does understand the <APPLET> tag ignores everything on that line. If the applet-savvy browser can't run the applet, it might display the ALT text.
A good beginning makes a good ending

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview