Loading
The border-style property in CSS specifies the style of the border around an HTML element. You can apply it to all sides at once or individually to the top, right, bottom, or left.



Syntax:

selector {
  border-style: value;
}



Common border-style Values

ValueDescription
solidA single solid line
dottedA series of small dots
dashed A series of short dashes
doubleTwo solid lines with a gap in between
grooveA 3D grooved border
ridgeA 3D ridged border
insetMakes the element look embedded
outsetMakes the element look raised
noneNo border
hiddenSimilar to none, but used in tables



Apply Styles to Individual Sides

Use these properties for individual sides:

border-top-style: dotted;
border-right-style: solid;
border-bottom-style: dashed;
border-left-style: double;



Example: Multi-style Borders

<!DOCTYPE html>
<html>
<head>
    <style>
        p {
            border-top-style: dotted;
            border-right-style: solid;
            border-bottom-style: dashed;
            border-left-style: double;
            border-width: 5px;
            padding: 2em;
        }
    </style>
</head>
<body>
    <h2>border-style (single-side)</h2>
    <p>Welcome to Quipoin</p>
</body>
</html>

Output:

Uploaded Image