Responsive Web Design: final quiz

Eight questions covering the whole Responsive Web Design course.

  • Beginner
  • 8 questions

8 questions. Pass mark 70%.

  1. Question 1 of 8 Which viewport meta tag should you use on a responsive page?
  2. Question 2 of 8 In mobile-first CSS, where do the styles for the narrowest screens go?
  3. Question 3 of 8 Which media queries match a viewport that is 50rem wide?

    Select all that apply.

  4. Question 4 of 8 A browser has this image markup. Without the sizes attribute, what display width does the browser assume when choosing a file?
    Plain text
    <img src="photo-800.jpg"
         srcset="photo-400.jpg 400w, photo-800.jpg 800w, photo-1600.jpg 1600w"
         alt="A mountain lake" width="1600" height="1067">
  5. Question 5 of 8 Which fluid font size is the most accessible?
  6. Question 6 of 8 What does this grid do in a container that is 18rem wide?
    CSS
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
      gap: 1rem;
    }
  7. Question 7 of 8 Which CSS lets a card change layout based on its own available width, rather than the viewport’s?
  8. Question 8 of 8 A hero section should fill the screen on first load on phones, with its button always visible, and still grow if text is zoomed. Which CSS is best?
    CSS
    /* Option A */
    .hero { height: 100vh; }
    
    /* Option B */
    .hero { min-height: 100vh; min-height: 100svh; }
    
    /* Option C */
    .hero { height: 100dvh; }