Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

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.

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

Syntax

var str = element.title;
element.title = str;

Example

 button1.title = "click to refresh";

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'title' in that specification.
Living Standard No change from Document Object Model (DOM) Level 2 HTML Specification.
Document Object Model (DOM) Level 2 HTML Specification
The definition of 'title' in that specification.
Recommendation No change from Document Object Model (DOM) Level 1 Specification.
Document Object Model (DOM) Level 1 Specification
The definition of 'title' in that specification.
Recommendation Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) (Yes) (Yes) (Yes)
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

See also

  • The HTML title global attribute.

문서 태그 및 공헌자

 이 페이지의 공헌자: Jeremie, fscholz, teoli, bjb568, OWaz, ajaybhat, kscarfone, Sheppy, Matej Lednar, RodMcGuire
 최종 변경: Jeremie,