Text with onmouseover="this.style.cursor='hand'" onmouseout="this.style.cursor='default'"

I have some text on a form that when the mouse is over I want to change the cursor style to hand

I know I can do it with a tag by doing the following:
<img src="image.gif" onmouseover="this.style.cursor='hand'" onmouseout="this.style.cursor='default'">

but how do I do it with simple text?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

davbouchardConnect With a Mentor Commented:
You can do it with stylesheet also. See example:


   cursor: pointer;


<td class="Hand">Text here</td>
b0lsc0ttIT ManagerCommented:

Assign the onmouseover and onmouseout events to the element that holds the text (i.e. p, div, etc).  It will work the same as img.

Let me know if you have any questions or need more information.

b0lsc0ttIT ManagerCommented:
To see the tags that event supports look at http://www.w3schools.com/jsref/jsref_onmouseover.asp.

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

prowebinteractiveAuthor Commented:
cannot do that since it is in a <td> and it is just plain text in between drop down lists

I put the text in the following tag
<a href="#">Text</a>

It worked
I forgot to mention, hand is not a type of cursor, pointer is.

b0lsc0ttIT ManagerCommented:
The td or a tag can also have onmouseout or onmouseover.  From your last comment it seems like the problem is solved.  Is that correct?  If not then let us know if we can help.

b0lsc0ttIT ManagerCommented:
You just answered my question. :D
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.