โ† All CSS Flashcard Decks

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
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. In Flexbox, which property aligns items along the main axis?

    Answer: justify-content

    `justify-content` distributes items along the flex container's main axis.

  7. 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.