What is styling text input caret ?
CSS (Cascading Style Sheets) is a stylesheet language used to design a webpage to make it attractive. The reason for using this is to simplify the process of making web pages presentable. It allows you to apply styles on web pages. More importantly, it enables you to do this independent of the HTML that makes up each web page.
In this article, we are going to learn what is styling text input caret.
The insertion caret, the visible marker where the next character typed will be inserted and this is also referred to as the text input cursor. It appears only when you want to enter some text into the editor. In HTML it is used with the input element. It is a thin vertical line that flashes to make it more noticeable. By default, it is black, but its colour can be altered with this property.
- auto(default): It has a default value. It uses the current colour in the web browser.
- color: It is used to specify the colour value used for the caret. All values can be used (rgb, hex, named-color, etc).
Example: In the below example we have two input boxes. In the top box, the colour of the caret is black but the bottom input box has a caret of red colour.