Để đặt màu con trỏ (cursor), hãy sử dụng thuộc tính CSS caret-color. Bạn có thể chạy mã sau để triển khai thuộc tính caret-color:
Ví dụ
<!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>