Can I change the blinking caret in a form/text area in a browser?

Dave picture Dave · May 23, 2011 · Viewed 8.1k times · Source

I want to have a custom text caret in my text field for my web page. I would like to have an old school block type blinking caret. Is this possible?

Answer

colinross picture colinross · May 23, 2011

The simple answer is you can't (change the user's blinking caret) via javascript, html, or css as that is created and managed by the chrome (the browser beyond the DOM)

Wanna fake it? http://www.dynamicdrive.com/forums/showthread.php?t=17450

The code examples shown are pretty old, but the idea remains the same-- Make a blinking box and have it tail the input...

With thats all said, I highly suggest against using it in anything but the smallest, niche, 'for fun' way as having a javascript function fire and be altering the DOM on every keyDown is bordering on user abuse imho.