Note: Not to be confused with the <title> tag. The tag and the attribute are two different things.


Attributes: title (text)

Paragraphs are defined with the <p> tag and in this example, the <p> element has a title attribute. The value of the attribute is "About W3Schools".

HTML file: Displayed by browser:
<p title="About W3Schools">
W3Schools is a web developer's site. It provides tutorials and references covering many aspects of web programming, including HTML, CSS, JavaScript, XML, SQL, PHP, ASP, etc.
</p>

About W3Schools

W3Schools is a web developer's site. It provides tutorials and references covering many aspects of web programming, including HTML, CSS, JavaScript, XML, SQL, PHP, ASP, etc.

Hold the mouse cursor over the paragraph (in the "Displayed in browser" section), to see the title displayed as a tooltip.

Back button Table of Contents Next button