Locked lesson.
About this lesson
Exercise files
Download this lesson’s related exercise files.
Borders.docx58.7 KB Borders - Solution.docx
58.8 KB
Quick reference
Borders
Adding and styling a border is easy.
When to use
Whenever you want to add a border to an element, use the border-style property.
Instructions
Here are the different border properties and values:
border-style: dashed;
border-style: dotted;
border-style: solid;
border-style: double;
border-style: groove;
border-style: hidden;
We can change the size of a border with:
border-width: 5px;
We can change the color of a border with:
border-color: red;
And we can change the style for each side of a border:
border-top-style: dotted
border-bottom-style: dashed;
border-left-style: dotted;
border-right-style: solid;
Hints & tips
- Borders are a fun and easy way to add some design elements
- Borders can be dashed, dotted, solid, double, groove, and hidden
- You can easily change the color and size of a border with border-color and border-width
Lesson notes are only available for subscribers.