When To Use A Title [<a title>] In HTML (With Code Example)
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
- Attribute of
- How To Use a (For Creating Hyperlinks) In HTML
- What does
When To Use A Title [<a title>] In HTML (With Code Example)do? - Defines the title of a link, which appears to the user as a tooltip.
Contents
Code Example
<a href="/" title="HOME - HTML Code Tutorials">Click to visit home page.</a>The text of the title attribute is displayed as a tooltip in most browsers — it appears in a small bubble when the cursor hovers over the link. Originally, this was intended to be used to indicate the title of the linked document. This is still a good practice, but you may use it for any text which you think will be helpful to the user.
Values of the title Attribute
| Value Name | Notes |
|---|---|
| text | The title of the link. Displays as a tooltip. |
All Attributes of the anchor Element
| Attribute name | Values | Notes |
|---|---|---|
| hreflang | Specifies the language of the linked resource. | |
| download | Directs the browser to download the linked resource rather than opening it. | |
| target | _blank _parent _self _top frame name | Specifies the context in which the linked resource will open. |
| title | text | Defines the title of a link, which appears to the user as a tooltip. |
| href | url | Specifies the linked document, resource, or location. |
| name |
Browser Support for title
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| All | All | All | All | All | All |





