Recall & Review
beginner
What CSS property is used to add a border around an element?
The
border property is used to add a border around an element. It can set the width, style, and color of the border.Click to reveal answer
beginner
How do you make a border that is 2 pixels thick, solid, and red?
Use
border: 2px solid red;. This sets the border width to 2 pixels, style to solid, and color to red.Click to reveal answer
beginner
What are some common border styles you can use in CSS?
Common border styles include
solid, dashed, dotted, double, and none.Click to reveal answer
intermediate
How can you add different borders to each side of an element?
Use the side-specific properties:
border-top, border-right, border-bottom, and border-left.Click to reveal answer
beginner
What does the CSS property
border-radius do?border-radius rounds the corners of the border, making them curved instead of sharp.Click to reveal answer
Which CSS property controls the thickness of a border?
✗ Incorrect
border-width sets how thick the border is.
What value for
border-style creates a dashed border?✗ Incorrect
dashed creates a border made of dashes.
How do you remove a border from an element?
✗ Incorrect
All these ways remove the border visually.
Which property rounds the corners of a border?
✗ Incorrect
border-radius makes corners rounded.
If you want a different border on the top and bottom, which properties do you use?
✗ Incorrect
border-top and border-bottom let you style top and bottom borders separately.
Explain how to create a red, 3px thick, dotted border around a box in CSS.
Think about the order: width, style, color.
You got /4 concepts.
Describe how you can make only the left border of an element blue and 5 pixels wide.
Remember you need to set style along with width and color.
You got /4 concepts.