Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to select all <p> elements and make their text red.
CSS
p [1]
color: red;
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using square brackets or parentheses instead of curly braces.
Forgetting the opening brace after the selector.
✗ Incorrect
The correct syntax to start a CSS rule block is with a curly brace '{'.
2fill in blank
mediumComplete the code to select all <h1> elements and set their font size to 2rem.
CSS
h1 [1] font-size: 2rem; }
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using parentheses or brackets instead of curly braces.
Omitting the opening brace.
✗ Incorrect
CSS rules use curly braces '{' to start the declaration block after the selector.
3fill in blank
hardFix the error in the code to select all <li> elements and make their text bold.
CSS
li [1]
font-weight: bold;
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong brackets or missing the opening brace.
Placing the brace on the wrong line.
✗ Incorrect
The CSS rule block must start with a '{' after the selector to group declarations.
4fill in blank
hardComplete the code to select all <a> elements and remove their underline.
CSS
a {
text-decoration: [1];
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using parentheses instead of curly braces.
Setting text-decoration to 'underline' instead of 'none'.
✗ Incorrect
Use '{' to start the CSS block and 'none' to remove underline from links.
5fill in blank
hardFill both blanks to select all <h2> elements, set color to blue, and add margin of 1rem.
CSS
h2 {
color: [1];
margin: [2];
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong brackets to open the block.
Using incorrect color names or units for margin.
✗ Incorrect
Start the CSS block with '{', set color to 'blue', and margin to '1rem' for spacing.