Labeling Elements in a Web Page


You can use the title attribute to add a tool tip label to practically every part of your Web site. It's particularly helpful for giving your visitors clues about what's needed in form elements, but you can use it to label just about anything.

To label elements in a Web page:

In the (X)HTML tag for the item you want to label, add title="label", where label is the text that should appear in the tool tip when a visitor points at the element.

Figure 3.25. You can add a title to any element you wish.


Figure 3.26. When your visitors point at the labeled element, the title will appear.


Tip

  • Explorer for Windows also makes popup labels or tool tips out of the alt attribute used in image tags (see page 91). However, if both the title and alt attributes are present in an image tag, the tool tip is set to the contents of the title tag, not the alt tag. So, if you don't want Explorer for Windows to use your alt tag as a tool tip, use an empty title: title="".





HTML, XHTML, & CSS(c) Visual QuickStart Guide
HTML, XHTML, and CSS, Sixth Edition
ISBN: 0321430840
EAN: 2147483647
Year: 2004
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net