Responsive and Mobile-First Web Design interview questions

18 questions from the Responsive and Mobile-First Web Design course, each with the correct answer and an explanation. Try to answer before you open the answer.

Module 1: Getting Started

1. Which is a pillar of responsive design?

  1. Fixed widths only
  2. Flexible grid
  3. Desktop-first approach
  4. Pixel-perfect desktop mockups
Show answer

Answer: Flexible grid

Flexible grid using %, em, rem is a core pillar.

Lesson: What is responsive design?

Module 2: Foundation

2. What does @media (min-width: 768px) mean?

  1. Apply when screen is 768px or narrower
  2. Apply only at exactly 768px
  3. Apply when screen is 768px or wider
  4. Apply only when the screen is exactly 768px
Show answer

Answer: Apply when screen is 768px or wider

`min-width: 768px` means "768px and above" — a lower bound.

Lesson: CSS media queries

3. Should breakpoints be based on devices or content?

  1. Device names
  2. Popular devices only
  3. Always the width of the newest iPhone
  4. Content
Show answer

Answer: Content

Content-driven breakpoints work for any device, known or unknown.

Lesson: Breakpoints strategy

Module 3: Core Techniques

4. What's wrong with hover-only tooltips on mobile?

  1. They're invisible on touch screens
  2. They slow down the page
  3. They're too large
  4. They are always too large
Show answer

Answer: They're invisible on touch screens

Touch devices don't have hover state.

Lesson: Touch interactions

Module 4: Layout Systems

5. What does minmax(280px, 1fr) do in CSS Grid?

  1. Makes columns exactly 280px
  2. Ensures columns are at least 280px, grow to fill space
  3. Limits columns to 280px maximum
  4. Sets a fixed height of 280px
Show answer

Answer: Ensures columns are at least 280px, grow to fill space

minmax() sets both minimum and maximum values for flexible sizing.

Lesson: CSS Grid responsive

6. What's the advantage of container queries over media queries?

  1. They're faster
  2. They work on all browsers
  3. Components adapt to their container, not viewport
  4. They remove the need for CSS
Show answer

Answer: Components adapt to their container, not viewport

Container queries make reusable components that adapt anywhere.

Lesson: Container queries

Module 5: Design Patterns

7. Which media feature detects a user who wants less animation?

  1. prefers-reduced-motion
  2. prefers-color-scheme
  3. orientation
  4. hover
Show answer

Answer: prefers-reduced-motion

prefers-reduced-motion: reduce reflects the OS reduce-motion setting.

Lesson: User preference media queries

Module 7: Best Practices

8. What's the minimum touch target size?

  1. 20x20px
  2. 32x32px
  3. 10x10px
  4. 44x44px
Show answer

Answer: 44x44px

44x44px (Apple guideline) or 48x48px (Android) is recommended.

Lesson: Accessibility for mobile

Module 8: Tools & Resources

9. Which meta tag makes a page render at the device width on mobile?

  1. charset
  2. robots
  3. viewport
  4. description
Show answer

Answer: viewport

The viewport meta tag stops mobile browsers from assuming a desktop width.

Lesson: Cheatsheet & Interview Q&A

10. In mobile-first CSS, which query do you mainly use?

  1. max-width
  2. orientation only
  3. print
  4. min-width
Show answer

Answer: min-width

Base styles target mobile, and min-width layers on larger screens.

Lesson: Cheatsheet & Interview Q&A

11. What does clamp(1rem, 2.5vw, 2rem) do?

  1. Scales smoothly between a minimum and maximum
  2. Fixes the size at 2.5vw
  3. Hides the element
  4. Sets a media query
Show answer

Answer: Scales smoothly between a minimum and maximum

The value follows the preferred size but never leaves the min and max.

Lesson: Cheatsheet & Interview Q&A

12. Which Grid pattern creates responsive columns without media queries?

  1. grid-template-columns: 300px 300px
  2. repeat(auto-fit, minmax(280px, 1fr))
  3. float: left
  4. display: inline
Show answer

Answer: repeat(auto-fit, minmax(280px, 1fr))

auto-fit with minmax wraps columns as space allows.

Lesson: Cheatsheet & Interview Q&A

13. What do container queries style components by?

  1. The viewport only
  2. The user agent
  3. Their container's width
  4. The page title
Show answer

Answer: Their container's width

The same component adapts to wherever it is placed.

Lesson: Cheatsheet & Interview Q&A

14. Which attribute lets browsers pick an image size by screen?

  1. alt
  2. rel
  3. lang
  4. srcset
Show answer

Answer: srcset

srcset with sizes lets the browser download the right resolution.

Lesson: Cheatsheet & Interview Q&A

15. What is a recommended minimum touch target size?

  1. 44x44px
  2. 16x16px
  3. 10x10px
  4. 24x12px
Show answer

Answer: 44x44px

Larger targets prevent mis-taps on touch screens.

Lesson: Cheatsheet & Interview Q&A

16. Which Core Web Vital measures unexpected layout movement?

  1. LCP
  2. CLS
  3. INP
  4. TTFB
Show answer

Answer: CLS

CLS drops when images and ads reserve space with width, height or aspect-ratio.

Lesson: Cheatsheet & Interview Q&A

Module 10: Revision & Summary

17. Which of these is NOT a pillar of responsive design?

  1. Flexible grid with percentage widths
  2. Media queries for breakpoints
  3. Fixed-width containers
  4. Flexible, scalable media
Show answer

Answer: Fixed-width containers

Fixed-width containers lock layouts to one size — the opposite of responsive design. Use flexible widths instead.

Lesson: Responsive design recap

18. Why is mobile-first better than desktop-first?

  1. Simpler CSS, forces prioritization, better performance
  2. It's just a trend
  3. Mobile users don't need features
  4. Desktop browsers cannot run it
Show answer

Answer: Simpler CSS, forces prioritization, better performance

Mobile-first CSS is cleaner, and you add complexity only when needed.

Lesson: Responsive design recap

← Back to the course