CSS caret-color attribute

Definition and Usage

The caret-color property specifies the color of the cursor (insertion symbol) in input, textareas, or any editable elements.

Example

Sets the color of the cursor in the input element:

input { 
  caret-color: red;
}

Try it yourself

CSS Syntax

caret-color: auto|color;

Attribute Value

Value Description
auto Default. The browser uses currentColor for the insertion symbol.
color

Specifies the color used for the insertion symbol. All valid color values can be used (rgb, hexadecimal, named colors, etc.).

For more information on valid values, see Χρώματα CSSTutorial.

Technical details

Default value: auto
Inheritance: Yes
Animation creation: Not supported. See also:Animation-related properties.
Version: CSS3
JavaScript Syntax: object.style.caretColor="red"

Browser Support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome IE / Edge Firefox Safari Opera
57.0 79.0 53.0 11.1 44.0