Skip to content
Related Articles
Get the best out of our app
Open App

Related Articles

How to hide the insertion caret in a webpage using CSS ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Insertion caret or text input cursor generally refers to a flashing, thin vertical line. It functions in an input field to indicate where the next character typed will be inserted.

If you wish to hide this input cursor from input fields in your webpage, the caret-color property of CSS is used. It has three property values including auto, color, and transparent. In this article, we’ll focus on the transparent value. 


caret-color: transparent;

Example: The following example hides the text input cursor using CSS.


<!DOCTYPE html>
    <title>Hide insertion caret</title>
        body {
            text-align: center;
        .hidden {
            caret-color: transparent;
    <h2 style="color:green;">Welcome To GFG</h2>
    <h2> Visible Input Text Cursor </h2>
    <input type="text"><br><br>
    <h2> Hidden Input Text Cursor Using
        <b>transparent</b> value
    <input type="text" class="hidden">


Hide cursor

My Personal Notes arrow_drop_up
Last Updated : 01 Aug, 2021
Like Article
Save Article
Similar Reads
Related Tutorials