property

Caret — CSS reference

Shorthand for insertion-caret appearance and behavior, covering caret-color, caret-shape and caret-animation in the current draft. A caret-color declaration before the shorthand supplies a fallback. Do not hide the insertion point or substitute a decorative border for it.

Formal Syntax & Structure

css syntaxcss
caret: red;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>caret</title><style>body{margin:8px;font:16px/24px sans-serif}#a{caret-color:red;caret:red}</style><body><label>Message <input id="a" value="Edit this"></label></body></html>
CSS Reference