W3Schools Responsive Web Development Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Attempts: 11 | Questions: 20 | Updated: Aug 15, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. What does the HTML5 "picture" element provide?

Explanation

The HTML5 `` element lets browsers choose among multiple image sources based on conditions such as viewport size, resolution, or supported formats. This enables responsive images and art direction—for example, serving a cropped image on small screens and a wider version on large screens.

Submit
Please wait...
About This Quiz
W3Schools Responsive Web Development Quiz - Quiz

Test your knowledge of responsive web development using HTML, CSS, JavaScript, and Python. This quiz covers modern web design principles, layout techniques, media queries, flexible grids, and best practices for creating websites that adapt across devices. Ideal for college students and developers preparing for W3Schools certifications.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. Which HTML attribute specifies responsive image sources?

Explanation

The `srcset` attribute provides multiple image source options at different sizes or resolutions, allowing the browser to select the most suitable image for the device and display conditions.

Submit

3. What does CSS "calc()" function allow you to do?

Explanation

CSS `calc()` lets you combine values and perform arithmetic directly in CSS declarations, such as setting a width to `100% - 20px`. This is useful when a layout needs to mix units like percentages, pixels, or viewport units.

Submit

4. In Python, which framework is commonly used for web development?

Explanation

Flask and Django are popular Python frameworks for building web applications. Flask is lightweight and flexible, while Django provides a more comprehensive set of built-in tools, such as routing, database support, and authentication. The other options are mainly associated with data analysis, game development, and machine learning.

Submit

5. What does CSS "justify-content" do in Flexbox?

Explanation

In Flexbox, `justify-content` positions and distributes flex items along the container’s main axis. The main axis runs horizontally by default, but its direction depends on the `flex-direction` setting.

Submit

6. Which media query breakpoint is commonly used for tablets?

Explanation

A width of 768px to 1024px is commonly associated with tablet screens in responsive web design. Developers often use this breakpoint range to adjust layouts, navigation, and content sizing for tablets, though exact breakpoints can vary depending on the device and design requirements.

Submit

7. How does CSS "aspect-ratio" property help responsive design?

Explanation

The `aspect-ratio` property sets a preferred width-to-height ratio for an element. As its dimensions change with the available space, the browser preserves that proportion, helping images, video containers, and other elements remain visually consistent across screen sizes.

Submit

8. What is the default value of CSS "box-sizing"?

Explanation

The default value of the CSS `box-sizing` property is `content-box`. With this setting, an element’s specified width and height apply only to its content area. Padding and borders are added outside those dimensions, so the element’s total rendered size can be larger than its declared width and height.

Submit

9. Which JavaScript event fires when the window is resized?

Explanation

The `resize` event fires when the browser window’s dimensions change. You can listen for it on the `window` object, for example with `window.addEventListener("resize", handler)`.

Submit

10. In CSS, what does the "clamp()" function do?

Explanation

CSS `clamp()` sets a value within a defined range: it uses a preferred value when possible, but never goes below the minimum or above the maximum. For example, it can make text or spacing responsive while keeping it within set limits.

Submit

11. Which HTML meta tag is essential for responsive design?

Explanation

The essential tag is ``. It tells the browser to match the page’s width to the device’s screen and use a normal initial zoom level, allowing responsive layouts to display and scale properly on phones and other devices.

Submit

12. Which CSS property controls the minimum width of a container?

Explanation

The `min-width` property sets the smallest width an element can shrink to. If its content or layout would make it narrower, the element remains at least as wide as the specified minimum.

Submit

13. What is a 'mobile-first' design approach?

Explanation

A mobile-first approach begins by designing for the smaller screens and constraints of mobile devices. The experience is then progressively enhanced for larger screens, ensuring the core content and functionality work well on mobile.

Submit

14. Which JavaScript method detects the viewport width?

Explanation

`window.innerWidth` returns the width of the browser’s viewport in CSS pixels, which is the visible area where the webpage is displayed. Unlike screen dimensions, it reflects the available page area and can change when the browser window is resized.

Submit

15. What does the CSS property "object-fit" do?

Explanation

The `object-fit` property controls how an image or other replaced content is scaled and positioned within its container. Values such as `cover` and `contain` determine whether the content fills the container or remains fully visible while preserving its aspect ratio.

Submit

16. Which approach is recommended for responsive images?

Explanation

Using `max-width: 100%` lets an image shrink to fit its container without exceeding its original size, while `height: auto` preserves its aspect ratio. This helps images adapt smoothly to different screen sizes without distortion or horizontal overflow.

Submit

17. In Flexbox, what does the "flex-wrap" property control?

Explanation

The `flex-wrap` property determines whether flex items stay on a single line or move onto additional lines when they no longer fit within the flex container. Its values include `nowrap`, `wrap`, and `wrap-reverse`, allowing you to control how items flow as available space changes. It does not set spacing, alignment direction, or text styling.

Submit

18. What is the purpose of a CSS Grid in responsive layouts?

Explanation

CSS Grid lets you arrange elements in rows and columns, making it easy to build two-dimensional layouts. Its flexible sizing and placement features help layouts adapt automatically to different screen sizes.

Submit

19. Which CSS unit is most flexible for responsive design?

Explanation

Relative units such as em, rem, and percentages scale in relation to font sizes or parent elements, helping layouts adapt to different screen sizes and user settings. Unlike fixed units such as pixels, points, or inches, they support more flexible, responsive designs.

Submit

20. What does a media query in CSS allow developers to do?

Explanation

A CSS media query applies different styles depending on device or viewport characteristics, such as screen width, orientation, or resolution. This helps developers create responsive designs that adapt to different devices.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What does the HTML5 "picture" element provide?
Which HTML attribute specifies responsive image sources?
What does CSS "calc()" function allow you to do?
In Python, which framework is commonly used for web development?
What does CSS "justify-content" do in Flexbox?
Which media query breakpoint is commonly used for tablets?
How does CSS "aspect-ratio" property help responsive design?
What is the default value of CSS "box-sizing"?
Which JavaScript event fires when the window is resized?
In CSS, what does the "clamp()" function do?
Which HTML meta tag is essential for responsive design?
Which CSS property controls the minimum width of a container?
What is a 'mobile-first' design approach?
Which JavaScript method detects the viewport width?
What does the CSS property "object-fit" do?
Which approach is recommended for responsive images?
In Flexbox, what does the "flex-wrap" property control?
What is the purpose of a CSS Grid in responsive layouts?
Which CSS unit is most flexible for responsive design?
What does a media query in CSS allow developers to do?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!