HTML Element Style How to - Change cursor for paragraph








Question

We would like to know how to change cursor for paragraph.

Answer


<html>
<head>
<style>
.pointer {<!--from ww  w  . j a  va 2  s  . c  o  m-->
  cursor: pointer;
}

.crosshair {
  cursor: crosshair;
}

.move {
  cursor: move;
}

.text {
  cursor: text;
}

.wait {
  cursor: wait;
}

.help {
  cursor: help
}
</style>
</head>

<body>
  <h1>Cursors</h1>

  <p class="pointer">This cursor is the pointer cursor</p>
  <p class="crosshair">This cursor is the crosshair cursor</p>
  <p class="move">This cursor is the move cursor</p>
  <p class="text">This cursor is the text cursor</p>
  <p class="wait">This cursor is the wait cursor</p>
  <p class="help">This cursor is the help cursor</p>


</body>
</html>

The code above is rendered as follows: