id attribute
title tag
a tag
area tag
CORE ATTRIBUTE: title
title="string"
Available in versions: 4.0
HTML 4.0 tag compatibility: All tags except
base, basefront, head, html, meta, param, script, style, title
The
title
core attribute is used to assign a name to a tag. This name can be any string of characters or words. Further, you can use the HTML character entities in the name. For example, you could use which will cause a line break (just like the
br
tag) in the name.
If you wish, you can reuse the same title values repeatedly inside an HTML document, or you could have each value be unique. In contrast, the
id
attribute requires that each id value must be unique.
Do not confuse this attribute with the
title
tag which is used to assign a title to a web document.
The
title
attribute is used by ToolTips on Internet Explorer to create a small window that automatically displays the text in the
title
when you run the mouse over a hyperlink or a mapped hyperlink image. This can be done with both the
a
and
area
tags. By default, this window is only displayed for about ten seconds. (This concept can also be applied to Netscape by using JavaScript functions. Please read the KB article for details.)
Code:
Please refer to the DevGuru Knowledge Base article:
<br>
<A href="/features/knowledge_base/a100216.html" title="ToolTips are really neat!">
A100216: Adding ToolTips to your HTML pages.
</a>
Output:
Please refer to the DevGuru Knowledge Base article:
A100216: Adding ToolTips to your HTML pages.
As another example, consider the situation where you have a large number of tables on your web page. By placing a
title
in both the opening and closing
table
tags, it becomes much easier to identify and keep track of the start and stop of individual tables inside your code.
Code:
<table title="PhoneNumbers">
... table entries
</table title="PhoneNumbers">
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information