0
0
CSSmarkup~10 mins

Border styles in CSS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add a solid border to the box.

CSS
div {
  border-style: [1];
}
Drag options to blanks, or click blank then click option'
Anone
Bsolid
Cdotted
Ddouble
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'none' will remove the border.
Using 'dotted' creates dots, not a solid line.
2fill in blank
medium

Complete the code to set the border width to 3 pixels.

CSS
div {
  border-width: [1];
}
Drag options to blanks, or click blank then click option'
A3px
Bmedium
Cthick
Dthin
Attempts:
3 left
💡 Hint
Common Mistakes
Using keywords like 'thin' or 'medium' instead of exact pixel value.
Forgetting to add 'px' after the number.
3fill in blank
hard

Fix the error in the code to correctly set a dashed border.

CSS
div {
  border-style: [1];
}
Drag options to blanks, or click blank then click option'
Adashes
Bdash
Cdashed
Ddot
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'dash' or 'dashes' which are not valid CSS border styles.
Confusing 'dotted' with 'dashed'.
4fill in blank
hard

Fill both blanks to create a red, double border.

CSS
div {
  border-style: [1];
  border-color: [2];
}
Drag options to blanks, or click blank then click option'
Adouble
Bsolid
Cred
Dblue
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'solid' instead of 'double' for the style.
Using 'blue' instead of 'red' for the color.
5fill in blank
hard

Fill all three blanks to create a 5px dotted green border.

CSS
div {
  border-width: [1];
  border-style: [2];
  border-color: [3];
}
Drag options to blanks, or click blank then click option'
A3px
B5px
Cdotted
Dgreen
Attempts:
3 left
💡 Hint
Common Mistakes
Using '3px' instead of '5px' for width.
Using 'solid' instead of 'dotted' for style.
Using 'blue' or other colors instead of 'green'.