1, HTML
2, CSS

2.7 Borders

⭐ Now in this session of our CSS course, you are going you are going to learn how to create borders on different elements on your CSS.

Are you ready to do that? 🤩 Yes you are. Let's go.
1. Write the basic HTML code, open and close style tags inside.
2. Create a div inside the body tag.
3. Give your div a class or id. We will use a class of 'our-div' for now.
Tips: When you write classes don't add spaces because if we add spaces the computer thinks that you created two classes for it so we use '-' instead. But if you want two classes, you can use space. ⭐ But for id, there is only one id for an element.
4. Go to your style tag and select the div using class. Because we named it 'our-div' we will say '.our-div' in the style tag.

Open and close curly brackets after selecting the div.
5. Inside the curly bracket give your div a width and height.
6. And then inside the curly brackets write the following code border: 5px solid black;
😉 This makes your div have a border which has a black color and 5px thickness.
Change the color and the thickness as you want, it will become a practice for you along the way.


Your website would be similar to this one