HTML title attribute

title attribute specifies a title for every visual HTML element. It gives advisory information about the element.

<h1 title="title test on h1">Test</h1>
<p title="you can see here the title">The title attribute can be written all html elements</p>
</>

Test

The title attribute can be written all html elements

Attribute values

All possible values of title attribute

The value of this attribute is plain text.

Related Tags

The tags that support title attribute

<abbr> tag

The title attribute represents the expanded form of the term in the abbr element.

<p><abbr title="hyper text markup language">HTML</abbr> is used to make the basic structure of page.</p>
Try</>

<dfn> tag

The title attribute represents the expanded or short form of the term in the dfn element.

<p><dfn title="hyper text markup language" id="h">HTML</dfn> is the abbreviation of hyper text markup language.</p>
<p><a href="#h">HTML</a> uses the markup to form the basic structure of a page.</p>
Try</>

<input> tag

input element represents an input field to enter the data.

<input type="password" title="write password of atleast 8 characters">
Try</>

<input> tag

The title attribute is applicable for all the HTML elements.



Was this article helpful?