Recall & Review
beginner
What is the basic structure of a CSS rule?
A CSS rule has a selector followed by a declaration block inside curly braces. The declaration block contains one or more property: value; pairs.
Click to reveal answer
beginner
What does a CSS selector do?
A CSS selector chooses which HTML elements the style rules will apply to.
Click to reveal answer
beginner
How do you write a CSS property and value?
Inside the declaration block, write the property name, then a colon, then the value, and end with a semicolon. Example:
color: blue;Click to reveal answer
beginner
Why are semicolons important in CSS declarations?
Semicolons separate each property-value pair. They tell the browser where one declaration ends and the next begins.
Click to reveal answer
beginner
What happens if you forget the closing curly brace in a CSS rule?
The browser may ignore the rule or all following rules, causing styles not to apply correctly. Always close with
}.Click to reveal answer
Which part of a CSS rule selects the HTML elements to style?
✗ Incorrect
The selector chooses which HTML elements the styles apply to.
How do you separate multiple CSS declarations inside a rule?
✗ Incorrect
Semicolons separate each property-value pair in CSS.
What symbol encloses the declarations in a CSS rule?
✗ Incorrect
Curly braces {} contain the declarations in a CSS rule.
Which is the correct way to write a CSS declaration for text color blue?
✗ Incorrect
The correct syntax is property: value; for example, color: blue;
What might happen if you forget the semicolon after a CSS declaration?
✗ Incorrect
Missing semicolons can cause the browser to ignore the whole rule or subsequent declarations.
Explain the parts of a CSS rule and how they work together to style a webpage.
Think about how you tell the browser what to style and how.
You got /6 concepts.
Describe common mistakes in CSS syntax and how they affect the appearance of a webpage.
Consider what happens if the browser can't read your CSS properly.
You got /4 concepts.