QuizzesOverflow and Scrolling — Concept Check
intermediate
html-css

Overflow and Scrolling — Concept Check

Questions on Overflow and Scrolling. Content that does not fit has to go somewhere. Choosing deliberately — clip, scroll, wrap or truncate — and making the result keyboard-accessible is the difference between a bug and a feature.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Overflow and Scrolling — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A developer notices that content is disappearing on a webpage. The CSS property used is `overflow: hidden`. What is the most likely reason for this behavior?

    • AContent is clipped and not scrollable, even by keyboard.
    • BContent is clipped but scrollable with a scrollbar.
    • CContent is visible but spills outside the container.
    • DA scrollbar is always shown, regardless of necessity.
  2. 2.You have a div with `overflow: auto`. What happens when the content inside grows beyond the container?

    • AContent spills visibly outside the container.
    • BA scrollbar appears only when needed.
    • CA scrollbar track is always visible.
    • DContent is clipped and not scrollable.
  3. 3.A webpage has a horizontal scrollbar despite no obvious overflow. Which CSS property might be causing this?

    • Aoverflow: visible
    • Bwidth: 100vw
    • Cmax-width: 100%
    • Doverflow: hidden
  4. 4.A developer uses `overflow: clip` on a container. What is the primary advantage of this choice?

    • AIt allows smooth scrolling of the content.
    • BIt makes the content keyboard-accessible.
    • CIt always shows a scrollbar track.
    • DIt clips content without creating a scroll container.
  5. 5.A user reports that they can't scroll a table using the keyboard. What might be missing in the HTML?

    • AThe table is wrapped in a `div` with `overflow: scroll`.
    • BThe `tabindex` attribute is not set.
    • CThe `overflow` property is set to `visible`.
    • DThe `role` attribute is missing.
  6. 6.A developer sets `overflow-x: auto` and `overflow-y: hidden` on a container. What is the result?

    • AHorizontal scrolling is enabled, vertical scrolling is disabled.
    • BHorizontal content is clipped, vertical content is visible.
    • CBoth axes are set to `auto`, allowing scrolling as needed.
    • DVertical scrolling is enabled, horizontal scrolling is disabled.
  7. 7.Why might `position: sticky` not work as expected inside a container with `overflow: auto`?

    • ASticky positioning requires `overflow: visible`.
    • BThe container clips content, making it invisible.
    • CSticky positioning is incompatible with scroll containers.
    • DThe container creates a block formatting context.
  8. 8.A developer wants to ensure a modal's scroll does not affect the page behind it. Which CSS property should they use?

    • Aoverflow: hidden
    • Bscroll-snap-type: x mandatory
    • Coverflow: clip
    • Doverscroll-behavior: contain