Open In App

How to set Outline Styling in CSS ?

Last Updated : 09 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

The outline-style property in CSS is specifically used to set the style of an element’s outline. It allows you to define the appearance of the outline, such as whether it should be a solid line, a dashed line, a dotted line, or other styles.

Syntax:

/* Setting the style of the outline */

.element {
outline-style: dashed; /* Example outline style */
}

Preview

Features

  • The outline-style property sets the style of the element’s outline in HTML.
  • It also accepts values like none, solid, dashed, dotted, double, groove, and others.
  • Combining outline-style with the broader outline property allows for comprehensive control over the outline’s appearance.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads