{"id":259152,"date":"2017-08-18T08:55:08","date_gmt":"2017-08-18T15:55:08","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=259152"},"modified":"2021-01-27T08:03:30","modified_gmt":"2021-01-27T16:03:30","slug":"caret-color","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/c\/caret-color\/","title":{"rendered":"caret-color"},"content":{"rendered":"\n

The caret-color<\/code> property in CSS changes the color of the cursor (caret) in inputs, texareas, or really any element that is editable, like:<\/p>\n\n\n\n

input,\ntextarea,\n[contenteditable] {\n  caret-color: red;\n}<\/code><\/pre>\n\n\n\n

The color of the caret generally matches the color<\/code> of the text, but this property allows you to change those independently.<\/p>\n\n\n\n\n\n\n\n