CSS Professional Development Flashcards
7 cards from real CSS practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 CSS Professional Development flashcards as text
Which CSS layout module is best suited for two-dimensional row and column layouts?
Answer: CSS Grid
CSS Grid handles both rows and columns, making it ideal for 2D layouts.
What does the `gap` property control in a flex or grid container?
Answer: Spacing between items
`gap` sets the spacing between rows and columns of grid or flex items.
Which value of `position` keeps an element fixed relative to the viewport while scrolling?
Answer: fixed
`position: fixed` anchors an element to the viewport regardless of scrolling.
What does `position: sticky` do?
Answer: Toggles between relative and fixed based on scroll position
A sticky element behaves relatively until a scroll threshold, then becomes fixed.
Which CSS function lets you clamp a value between a minimum and maximum for fluid sizing?
Answer: clamp()
`clamp(min, preferred, max)` constrains a value within a range for responsive sizing.
In Flexbox, which property aligns items along the main axis?
Answer: justify-content
`justify-content` distributes items along the flex container's main axis.
What does `aspect-ratio: 16 / 9` enforce on an element?
Answer: A consistent width-to-height proportion
`aspect-ratio` maintains a proportional relationship between width and height.