New: We've launched a brand new Coding Challenges section! Check out these interactive, real-world exercises to level up your skills.Explore Challenges
FrontendPrep
Topic Directory

CSS & Layouts Questions

Master your CSS & Layouts fundamentals, advanced mechanics, and ace your frontend interview challenges.

CSS & Layouts Stats
19questions loaded
7 Easy9 Medium3 Hard
Show
Sort

Showing 19 of 19 questions

CSS & Layouts
Easy

Aspect-Ratio in Modern CSS: Preventing Layout Shifts (CLS)

Understand the aspect-ratio CSS property, how it reserves space for media elements before they load, and how it mitigates Cumulative Layout Shift (CLS).

CSSResponsive DesignWeb Performance
4 min read
View
CSS & Layouts
Easy

CSS Box Model: content-box vs. border-box

Master the CSS Box Model. Learn the differences between content-box and border-box, margin collapsing, block vs. inline layouts, and modern layout sizing calculations.

CSSBox ModelLayouts+1
8 min read
View
CSS & Layouts
Easy

The Modern Ways to Center an Element in CSS

Master the most common CSS interview question: 'How do you center a div?' Learn the modern approaches using Flexbox and Grid, as well as legacy fallback methods.

CSSLayoutsFlexbox+1
5 min read
View
CSS & Layouts
Hard

CSS Animations vs Transitions and Hardware Acceleration

Learn the difference between CSS transitions and animations. Master performance optimization by understanding hardware acceleration and the browser rendering pipeline.

CSSAnimationsPerformance+1
8 min read
View
CSS & Layouts
Hard

Scalable CSS Architectures: BEM vs Utility-First vs CSS Modules

Understand how to maintain CSS in large web applications. Compare traditional methodologies like BEM with modern paradigms like Utility-First (Tailwind) and CSS Modules.

CSSArchitectureSystem Design+1
9 min read
View
CSS & Layouts
Medium

CSS Cascade Layers (@layer)

Understand Cascade Layers (@layer) in CSS and how they allow developers to control specificity and precedence across stylesheet layers.

CSSSpecificityStylesheets
6 min read
View
CSS & Layouts
Medium

CSS Container Queries (@container)

Learn how CSS Container Queries allow you to style elements based on the size of their parent container instead of the browser viewport.

CSSLayoutsResponsive Design
6 min read
View
CSS & Layouts
Medium

CSS Fluid Typography and clamp()

Learn how to build responsive layouts and fluid typography using CSS math functions: clamp(), min(), and max().

CSSResponsive DesignAccessibility
5 min read
View
CSS & Layouts
Hard

CSS Performance: Layout, Paint, and Composite

Understand the browser rendering pipeline, how CSS triggers layout, paint, and compositing cycles, and how to write highly optimized styles for animations.

CSSWeb PerformanceBrowsers
8 min read
View
Showing 1 to 9 of 19 questions