[X]

The Link That Refuses Focus

browser tricks 2000 still works

The dotted focus rectangle offended designers, so links were told to throw away their own focus.

In 2026: Works, tragically. onfocus="this.blur()" still runs and still does exactly what it did: the moment keyboard focus lands on the link it is thrown away, so tabbing walks into a hole. Its CSS descendant outline: none commits the same sin more politely. The fix was never to remove the outline but to style it.

Where it came from: A staple of late 90s and 2000s template markup, usually pasted next to border=0. The CSS outline property arrived in CSS2 and outline: none inherited the sin.
MDN MDN outline

<p style="font:13px Verdana">Click in this box, then press Tab a few times.</p>
<p><a href="#void">A normal link, focusable</a></p>
<p><a href="#void" onfocus="this.blur()">This link discards its own focus</a></p>
<p><a href="#void">Another normal link</a></p>
<p style="font:13px Verdana">Tabbing reaches the middle link and instantly loses
it. In 2000 that was called polish.</p>
sandboxed demo · breaks nothing but itselfrestart

More in browser tricks

all 30 in browser tricks › · the whole library ›