outline

CSS Outline

CSS Outline

Introduction to CSS Outline

The CSS outline is a line drawn around elements outside the border, making it a useful tool for emphasizing content. Unlike borders, outlines do not take up space in the box model.

CSS Outline Properties

Example


button {
    outline: 2px solid blue;
    outline-offset: 5px;
}
        

Browser Support

Most modern browsers support outline properties.