Share this page 

Display tooltip in HTMLTag(s): HTML/CSS


The TITLE attribute in almost every HTML tag is used to display a tooltip.
<html><body>
    <img src="../images/gumby.gif" title="My name is Gumby">
<p>
    <a href="http://www.google.com"
       title="The Google Search Engine">Google</a>
<p>
    <table title="Sales Figures">
    <caption>Jan 2007</caption>
        <tr title="row 1"><td>111111<td>222222
        <tr><td>333333<td title="col 4">444444
    </table>
</body></table>
<form>
<input type="text" size=25 title="Enter your email address here">
<input type="button" value="Submit" title="Click to submit!">
</form>
<div title="End of this HowTo">End.</div>

It looks like

Google

Jan 2007
111111222222
333333444444
End.

NOTE : IE can display *multi-line tooltip* but Firefox won't.
<span title="line 1 &#10; line 2">*multi-line tooltip*</span>