CSS borderstyle Property (original) (raw)

CSS border-style Property

Last Updated : 11 Jul, 2025

CSS border-style Property is used to set the border style, and it is a shorthand property that sets the line style for all four sides of an element's border.

**Note: The border-style property can take **One to **Four values at a time.

**Default Value: none

**CSS border-style Property Syntax:

border-style: value;

**CSS border-style Property Values:

CSS **border-style property is a shorthand for:

The below examples illustrate the use of the border-style property.

**CSS border-style property Example :

In This example we are using is using CSS border-style property which contain only one value for all borders.

HTML `

Dotted Borders

GeeksforGeeks

`

**Output:

CSS border-style property Example Output

**CSS border-style property Example Explanation:

Here is the explanantion of above exmaple.

**CSS border-style property example with multiple values:

In this example The CSS border-style property accepts multiple values to define different styles for each side of the border.

HTML `

Dotted Borders

GeeksforGeeks

`

**Output:

CSS border-style property with multiple values Example Output

**CSS border-style property with multiple values Example Explanation:

Here is the implemantation of above example.

CSS border-style Property Use Cases:

1. How to create and style border using CSS ?

we can use border properties like style, width, and color to create and style borders in CSS.

2. How to create a Border around an HTML Element using CSS ?

Here we can use CSS properties like border-style, border-width, and border-color to create a border around HTML elements.

**to

The browser supported by _border-style Property are listed below: