CSS caret-color Property

Set the caret-color of the cursor in input elements:

input {
caret-color: red;
}

Try it Yourself »


Definition and Usage

The caret-color property specifies the color of the cursor (caret) in inputs, textareas, or any element that is editable.

Default value: auto
Inherited: yes
Animatable:  Read about animatable
Version: CSS3
JavaScript syntax: object.style.caretColor=”red” Try it
CSS Syntax
caret-color: auto|color;
Property Values
Value Description
auto Default. Browsers uses the currentColor for the caret
color Specifies a color to use for the caret