Ever wish you could add a tooltip to add more information on an object on your web page? This week’s tip will show you how!
Tooltips are those little boxes of information that pop up when your mouse hovers over a link, picture,niece of text, or other object.
To create a tooltip on a web page:
- In your web page editor, make sure you can see and edit the HTML code. (If you are using Drupal, WordPress, or other content management system, you’ll need to click the HTML or Source button.)
- Locate the object in which you wish the tooltip to occur.
- Add the following code:
So, for example, to add a tooltip saying “photo of our group” to a picture of our staff, the code would look like this:
<img src="ourstaff.jpg" title="photo of our group">
And here’s how it would look:
Or if I wanted to add a tooltip to a link sending the visitor to Stanford’s home page:
<a href="http://www.stanford.edu">Return to Stanford</a>
Or to add a title to a paragraph:
<p title="all about widgets">this paragraph is about the study of widgets</p>