How to add a border to elements and make it rounded
What is a border?
A border is a set of lines that surrounds an element. We can see that a lot with images. Images often have a border, either a rectangular border or a circular border.
How can we add borders and style them?
To add a border to an element in CSS all you have to do is to use the border property.
Let’s say that we have a paragraph in HTML.
Which looks like this on the browser:
Now we want to add a border to our paragraph. To do that we have to define first the style of the border.
There are many styles that we can choose from. Below a list of some styles:
solid
inset
outset
dashed
dotted
ridge
In this example we will choose solid style. The CSS property we’re going to use is border-style.
The code for this is:
To continue reading you can check the entire article here:
https://purpose-code.com/css-border-how-to-add-a-border-and-make-it-rounded/












