Pick a style
Choose from solid, dashed, dotted, double, groove or ridge.
Preview and customize outline style, width, color and offset — great for building accessible focus states — then copy the CSS.
Choose from solid, dashed, dotted, double, groove or ridge.
Fine-tune thickness, color and the gap between element and outline.
Get a ready-to-paste outline declaration, ideal for :focus states.
Outline is drawn outside an element's border and does not take up layout space or affect box size, while border is part of the box model and does affect layout.
A visible outline on :focus is essential for keyboard users to see which element is currently focused; removing it entirely without a replacement harms accessibility.
It adds a gap between the element's edge and the outline itself, which can make the outline easier to see against a busy background.