इनपुट फ़ील्ड या संपादन योग्य क्षेत्र में टेक्स्ट कर्सर (कैरेट) का रंग सेट करने के लिए CSS caret-color प्रॉपर्टी का उपयोग करें।
उदाहरण
<!DOCTYPE html> <html> <head> <style> .demo { caret-color: blue; } </style> </head> <body> <p>Place the mouse cursor below to see a blue color cursor</p> <input class = "demo" value = "Blue Cursor"><br><br> </body> </html>
व्याख्या: .demo क्लास वाले इनपुट फ़ील्ड में caret-color: blue सेट किया गया है, जिससे टाइप करते समय कर्सर नीला दिखाई देता है।