JavaScript EditorBest javascript editor debugger     Ajax website 



Main Page

Previous Page
Next Page

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="".



Previous Page
Next Page


JavaScript EditorBest javascript editor debugger     Ajax website