Style caret Color Property

Style caret Color Property


Style caret Color Property
It is the CSS property to set the color of the insertion caret, the visible marker where the next character typed will be inserted.
It is used to set the color of the cursor in inputs, text areas, or other editable areas. 
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
 
Property
 
Chrome
 
firefox
 
microsoft edge
 
Opera
caret-color
 
57.0
 
53.0
 
79.0
 
44.0
 
Syntax
caret-color: auto|color|initial|inherit;
Example
Output
 
Property Values
 
Value
 
Description
 
auto
 
Default. Browsers uses the currentColor for the caret
 
color
 
Specifies a color to use for the caret. All legal color values can be used (rgb, hex, named-color, etc). For more information on legal values
 
initial
 
Set this property to its default value.
 
inherit
 
Inherits this property from its parent element.

 
Technical Details
 
Default value:
 
Auto
 
Version:
 
CSS3
 
inherited
 
Yes
 
Animatable
 
No
 
JavaScript syntax:
 
object.style.caretColor="red"