We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


Jump to:

« Element

The HTMLElement.title property represents the title of the element, the text usually displayed in a 'tool tip' popup when the mouse is over the displayed node.

If a node does not have a title attribute, then the default action is to inherit it from its parent node, which in turn may inherit it from its parent node, etc.

According to bug 264001, setting title to the empty string triggers the default inheriting behavior. To cancel inheritance, title must be set to a non-empty whitespace string.

 <div title="CoolTip>
   <div title="">mouse over here will popup "CoolTip"</div>
   <div title=" ">mouse over here will popup nothing"</div>


var string = element.title;
element.title = string;


 button1.title = "click to refresh";

Document Tags and Contributors

 Last updated by: teoli,