Changing cursor to hand with CSS

Changing cursor to hand with CSS

In this tutorial, we are going to learn about how to change the cursor to hand when a user hovers over an item/html element using the cursor CSS property.

cursor

In CSS, we have a cursor property which helps us to change the different types of a cursor when a user hovers over an html element.

Changing cursor to a hand

To change the cursor to a hand, we need to add cursor property with a value pointer to the element css selector.

Example:

Html

<ul>
  <li>Google</li>
  <li>Yahoo</li>
</ul>

Css

li:hover{
  cursor:pointer
}