0
0
CSSmarkup~5 mins

Writing reusable CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is reusable CSS?
Reusable CSS means writing styles that can be used on many elements or pages without rewriting the same code. It saves time and keeps code clean.
Click to reveal answer
beginner
Why use CSS classes for reusability instead of IDs?
Classes can be used on multiple elements, making styles reusable. IDs are unique and should be used only once per page.
Click to reveal answer
intermediate
What is a CSS variable and how does it help reuse?
A CSS variable stores a value (like a color) that you can reuse throughout your styles. Changing it once updates all places using it.
Click to reveal answer
intermediate
How does using utility classes improve CSS reusability?
Utility classes are small, single-purpose classes (like .text-center) that you can combine to style elements quickly without repeating code.
Click to reveal answer
advanced
What is the benefit of separating layout and theme styles in reusable CSS?
Separating layout (structure) and theme (colors, fonts) lets you reuse layout styles with different themes easily, making your CSS flexible.
Click to reveal answer
Which CSS selector is best for reusable styles?
AID selector
BElement selector
CClass selector
DInline style
What does a CSS variable start with?
A$
B@
C#
D--
Why avoid repeating the same CSS code in multiple places?
AIt makes maintenance harder
BIt improves browser speed
CIt makes the file smaller
DIt is required by CSS rules
What is a utility class in CSS?
AA class that applies one small style
BA class that styles the whole page
CA class that is only used once
DA class that uses !important
How can you make colors reusable in CSS?
AUse inline styles
BUse CSS variables
CUse element selectors
DUse !important
Explain how to write CSS that can be reused on many elements.
Think about how you can write styles once and apply them many times.
You got /4 concepts.
    Describe the benefits of separating layout and theme styles in reusable CSS.
    Consider how changing colors without touching layout helps.
    You got /4 concepts.