CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS border style Property

CSS border-style Property

 

 

The border-style property is used for setting the style of an element four borders. This property can have from one to four values.

 

For your Information:-

 

  • If only one style is specified then it is applied to all four borders.
  • If two styles are specified, then the first one will style the top and bottom and the second one will style the right and left.
  • If three styles are specified, then the first one will style the top border and the second one will style the right and left borders and the third one will style the bottom.
  • If all four styles are specified then each style goes to each border in the sequence.

 

Syntax:-

 

Its syntax is:- border-style: none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset | initial | inherit;

 

Further Explanation:-

 

Value Description
none Specifies no border
hidden The same as none
dotted Specifies a dotted border
dashed Specifies a dashed border
solid Specifies a solid border
double Specifies a double border
groove Specifies a 3D grooved border.
ridge Specifies a 3D ridged border.
inset Specifies a 3D inset border.
outset Specifies a 3D outset border.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS