HTML: The Definitive Guide

Previous Chapter 12 Next
 

12.3 Title Marquee

Here's a cute trick that is trivial, too, but effective. Better than <blink> and <marquee>, its effects don't persist, and it perks readers' attentions before they view your pages.

The HTML standard dictates that every document have a title in its head. The standard doesn't say, however, that you can't have more than one title. Most current browsers display the title contents in the titlebar of the document's display window. By including several title tags in the same document, you create a marquee effect, flashing or scrolling text across that title bar once before the body contents are displayed. It happens quickly, but it catches most readers' peripheral attentions and gives them something to ponder (``What was that?'') while waiting for the browser to render the rest of the document.

The following source illustrates the marquee effect. When rendered, the message, ``We love to eat kumquats!'' expands, then contracts in the browser's title space before getting replaced by the real title ``Kumquat Lovers Homepage'', which persists. (Notice we do include the final title at the beginning, in case an automated reader comes looking for it. Automated readers tend to look for what's expected and not beyond.)

<html>
<head>
<title>Kumquat Lovers Homepage</title>
<title>W</title>
<title>We</title>
<title>We </title>
<title>We l</title>
<title>We lo</title>
<title>We lov</title>
<title>We love</title>
<title>We love </title>
<title>We love t</title>
<title>We love to</title>
<title>We love to </title>
<title>We love to e</title>
<title>We love to ea</title>
<title>We love to eat</title>
<title>We love to eat </title>
<title>We love to eat k</title>
<title>We love to eat ku</title>
<title>We love to eat kum</title>
<title>We love to eat kumq</title>
<title>We love to eat kumqu</title>
<title>We love to eat kumqua</title>
<title>We love to eat kumquat</title>
<title>We love to eat kumquats!</title>
<title>We love to eat kumquats!</title>
<title>e love to eat kumquats!</title>
<title> love to eat kumquats!</title>
<title>love to eat kumquats!</title>
<title>ove to eat kumquats!</title>
<title>ve to eat kumquats!</title>
<title>e to eat kumquats!</title>
<title> to eat kumquats!</title>
<title>to eat kumquats!</title>
<title>o eat kumquats!</title>
<title> eat kumquats!</title>
<title>eat kumquats!</title>
<title>at kumquats!</title>
<title>t kumquats!</title>
<title> kumquats!</title>
<title>kumquats!</title>
<title>umquats!</title>
<title>mquats!</title>
<title>quats!</title>
<title>uats!</title>
<title>ats!</title>
<title>ts!</title>
<title>s!</title>
<title>!</title>
<title>Kumquat Lovers Homepage</title>
</head>


Previous Home Next
Trivial or Abusive? Book Index Custom Bullets
 


Banner.Novgorod.Ru