A border is a line around an element.
Border properties
border-style:solid,dashed,dotted,double,noneborder-width:2px,thin,thickborder-color: any colour
Shorthand
border: 2px solid #1f386b; (width, style, colour)
One side only
border-bottom: 3px dashed orange;
Rounded corners
border-radius: 10px; rounds the corners. border-radius: 50%; on a square makes a circle.
Note: a border is only visible when border-style is set.
Example
Example — Border styles and radius
HTML
<style>
div { padding: 12px; margin: 10px 0; }
.solid { border: 2px solid #1f386b; }
.dashed { border: 2px dashed tomato; }
.rounded { border: 2px solid green; border-radius: 12px; }
.circle { width: 80px; height: 80px; border: 4px solid purple; border-radius: 50%; }
</style>
<div class="solid">Solid border</div>
<div class="dashed">Dashed border</div>
<div class="rounded">Rounded corners</div>
<div class="circle"></div>