Outline
noun
say it: “OWT-lyne” /ˈaʊtlaɪn/
A line the browser draws around an element, outside its border, that takes up no space. Browsers use it to show which button or link has keyboard focus.
What is an outline in CSS?
An outline is a line drawn around an element outside its border. It takes up no space, which makes it ideal for focus rings.
a:focus-visible { outline: 3px solid orange; outline-offset: 2px; }
In a sentence
- “I put a red outline on every box while debugging, because it doesn't push the layout around the way a border does.”
- “When I pressed Tab, a blue outline appeared around the Adopt Me button.”
Level: Apprentice · More CSS terms at this level
Updated