The CSS property `outline: none;` disables or removes the outline...

July 3, 2025 at 07:06 AM

outline: none;

The CSS property outline: none; disables or removes the outline that is typically drawn around an HTML element when it is focused (e.g., by tabbing to the element via the keyboard, like when focusing on a button, input field, or link). This is commonly used to remove the visual focus indicator, which can appear as a border or highlight around the element.

Here's an example:

button {
  outline: none;
}

Using this on a button removes the default focus outline when the button is tabbed to or clicked.

Important Note:

While useful for styling, removing the outline can negatively affect accessibility. The focus outline helps keyboard and assistive technology users navigate a webpage. If you use outline: none;, ensure that you replace it with a custom visual focus indicator (e.g., a focus style with shadows, borders, or background changes).

Generate your own explanations
Download our vscode extension
Read other generated explanations

Built by @thebuilderjr
Sponsored by beam analytics
Read our terms and privacy policy
Forked from openai-quickstart-node