HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

caret

Description

The caret property for CSS is shorthand for setting caret-color and caret-shape.

Syntax

CSS

caret: value;

JS

object.style.caret = "value";

Values

<'caret'> = <'caret-color'> || <'caret-shape'>
<'caret-color'> = auto | <color>
auto

Automatically specified by the user agent.

<color>

Specifies the color using a keyword or a numerical specification.

<'caret-shape'> = auto | bar | block | underscore
auto

Automatically specified by the user agent.

bar

A thin bar placed at the insertion point.

block

A rectangle overlapping the next visible character following the insertion point.

underscore

A thin line under the next visible character following the insertion point.

Initial

auto

Examples

1 · caret-color · auto

2 · caret-color · color

3 · caret-color · JS

4 · caret-shape · auto

5 · caret-shape · bar

6 · caret-shape · block

7 · caret-shape · underscore

8 · caret-shape · JS