Challenge - 5 Problems
Critical CSS Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Understanding Critical CSS Purpose
Why is extracting critical CSS important for web performance?
Attempts:
2 left
💡 Hint
Think about what users see first when a page loads.
✗ Incorrect
Extracting critical CSS means loading only the CSS needed to display the above-the-fold content quickly. This speeds up the initial page render and improves user experience.
📝 Syntax
intermediate1:30remaining
Sass Partial for Critical CSS
Which Sass partial file naming convention is best for critical CSS to ensure it is loaded first?
Attempts:
2 left
💡 Hint
Sass partials start with an underscore and are imported into main files.
✗ Incorrect
Using _critical.scss as a partial allows you to import critical styles separately and control their load order.
❓ rendering
advanced2:00remaining
Effect of Critical CSS on Page Load
Given this HTML and Sass setup, what will the user see first when the page loads?
SASS
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> /* Critical CSS inlined here */ body { background: white; } header { color: blue; font-size: 2rem; } </style> <link rel="stylesheet" href="styles.css"> <title>Test Page</title> </head> <body> <header>Welcome!</header> <main> <p>This is the main content.</p> </main> </body> </html>
Attempts:
2 left
💡 Hint
Critical CSS is inlined in the inside