Specify the color of the cursor in elements with CSS

To set the cursor color, use the CSS caret-color property. You can try to run the following code to implement the caret-color property


Live Demo

<!DOCTYPE html>
         .demo {
            caret-color: blue;
      <p>Place the mouse cursor below to see a blue color cursor</p>
      <input class = "demo" value = "Blue Cursor"><br><br>