Prev | Current Page 238 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"


You??™ll note that the visited state is the same as the standard state in the previous
code block. While I don??™t recommend doing this for links in a page??™s general content
area, or for pages that have a lot of navigation links, I feel it??™s acceptable for sites that
have a small number of navigation links, where it??™s not likely a visitor will need notification
regarding which pages or sections have been accessed.
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
162
The title attribute
Regular users of Internet Explorer for
Windows may be familiar with its habit of
popping up alt text as a tooltip. This has
encouraged web designers to wrongly fill alt
text with explanatory copy for those links that
require an explanation, rather than using the
alt text for a succinct overview of the image??™s
content. Should you require a pop-up, add a
title attribute to your surrounding a element
to explain what will happen when the
link is clicked. The majority of web browsers
display its value when the link is hovered over
for a couple of seconds (see right), although
some older browsers, such as Netscape 4,
don??™t provide this functionality.

??This is some text that explains what<br>?? the image is

There are a few things to be mindful of when using title attributes. The first is that
behavior varies slightly between browsers, and the positioning and style of the tooltip cannot
be controlled.


Pages:
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250