← All CSS Flashcard Decks

Responsive Design & Media Queries 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 Responsive Design & Media Queries flashcards as text
  1. Which media feature queries the resolution of the output device?

    Answer: resolution

    The resolution media feature targets device pixel density, often in dpi or dppx.

  2. What does '@media (hover: none)' typically target?

    Answer: Touch devices without a hovering pointer

    hover: none matches devices whose primary input cannot hover, like touchscreens.

  3. Which at-rule is the modern alternative to media queries for styling based on a parent element's size?

    Answer: @container

    Container queries (@container) style elements based on their container's size.

  4. What does 'prefers-reduced-motion: reduce' indicate?

    Answer: The user wants minimized animations

    It signals the user prefers reduced or no animation for accessibility.

  5. Which media type targets printed output in a media query?

    Answer: print

    The print media type applies styles when the page is printed.

  6. In '@media screen and (min-width: 768px) and (max-width: 1024px)', which devices match?

    Answer: Screens between 768px and 1024px wide

    Both conditions must be true, so only widths in the 768–1024px range match.

  7. What is the purpose of the 'sizes' attribute alongside srcset?

    Answer: Tells the browser how wide the image will display at each breakpoint

    The sizes attribute helps the browser pick the right srcset candidate per layout width.