--- title: title slug: Web/HTML/Global_attributes/title tags: - Global attributes - HTML - Reference translation_of: Web/HTML/Global_attributes/title ---
title
전역 특성은 요소와 관련된 추가 정보를 제공하는 텍스트를 나타냅니다.
다음과 같은 경우 많이 쓰입니다.
{{HTMLElement("link")}}, {{HTMLElement("abbr")}}, {{HTMLElement("input")}}, {{HTMLElement("menuitem")}} 요소의 title
특성은 추가적인 뜻을 가지고 있습니다..
title
특성은 여러 줄을 가질 수 있으며, 모든 U+000A LINE FEED
(LF
) 문자가 줄을 바꿉니다. 즉, 다음의 경우 툴팁이 두 줄로 나타나므로 주의를 요해야 합니다.
<p><code>title</code> 안에서 줄을 바꿀 땐 조심해야 합니다. 이 <abbr title="This is a multiline title">예제</abbr>처럼요.</p>
요소가 title
특성을 가지고 있지 않을 땐 부모 요소로부터 상속합니다. 부모 요소 또한 자신의 부모로부터 상속할 수 있습니다.
title
에 빈 문자열을 지정한 경우 조상의 title
이 더 이상 관련되지 않았으며 해당 요소에 툴팁을 표시하지 말아야 함을 나타냅니다.
<div title="CoolTip"> <p>여기 어디에 마우스를 올리면 “CoolTip”이 나타납니다.</p> <p title="">하지만 여기에서는 나타나지 않죠.</p> </div>
title
특성은 다음과 같은 경우에 문제가 많습니다.
일관적이지 못한 브라우저 지원 문제에 더불어, 브라우저가 렌더링 한 페이지를 보조 기술이 분석함으로써 문제가 심해집니다. 툴팁 효과가 필요한 경우, 위에 해당하는 사용자도 접근하기 좋은 다른 기법을 사용하는 것이 좋습니다.
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "dom.html#the-title-attribute", "title")}} | {{Spec2('HTML WHATWG')}} | No change from latest snapshot, {{SpecName('HTML5.1')}} |
{{SpecName('HTML5.1', "dom.html#the-title-attribute", "title")}} | {{Spec2('HTML5.1')}} | Snapshot of {{SpecName('HTML WHATWG')}}, no change from {{SpecName('HTML5 W3C')}} |
{{SpecName('HTML5 W3C', "dom.html#the-title-attribute", "title")}} | {{Spec2('HTML5 W3C')}} | Snapshot of {{SpecName('HTML WHATWG')}}. From {{SpecName("HTML4.01")}}, it is now a true global attribute. |
{{SpecName('HTML4.01', 'struct/global.html#adef-title', 'title')}} | {{Spec2('HTML4.01')}} | Supported on all elements but {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("param")}}, {{HTMLElement("script")}}, and {{HTMLElement("title")}}. |
{{Compat("html.global_attributes.title")}}