CSS

How to change the cursor into a hand when a user hovers over a list item?

In this tutorial, we are going to see how to change the cursor into a hand when a user hovers over a list item. You can simply use cursor property with the value “pointer” to change the cursor to a hand pointer.
 

Source Code:
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Change the cursor into a hand</title>
		<style>
			li{
				   cursor: pointer;
				   margin: 20px 0;
			}
		</style>
	</head>
	<body>
		<h2>Title</h2>
		<ol>
			<li>Lorem ipsum dolor</li>
			<li>Lorem ipsum dolor</li>
			<li>Lorem ipsum dolor</li>
			<li>Lorem ipsum dolor</li>
		</ol>
	</body>
</html>
Result

Title

  1. Lorem ipsum dolor
  2. Lorem ipsum dolor
  3. Lorem ipsum dolor
  4. Lorem ipsum dolor
mcqMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More

Leave a Reply

Your email address will not be published. Required fields are marked *