QuizzesDisplay, Normal Flow and Formatting Contexts — Concept Check
intermediate
html-css

Display, Normal Flow and Formatting Contexts — Concept Check

Questions on Display, Normal Flow and Formatting Contexts. Before flexbox and grid there is normal flow, and every layout question starts with which formatting context an element is in. This is the model that makes the rest predictable.

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 Display, Normal Flow and Formatting Contexts — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A developer sets `display: inline` on a `<div>` element and notices the width property has no effect. What is the reason?

    • AThe width property requires a specific unit.
    • BThe width property is applied but not visible.
    • CThe width property is only for block elements.
    • DInline elements ignore width and height properties.
  2. 2.A parent element has `display: flex` and a child element has `align-self: center`. What will happen to the child element?

    • AThe child will be centered along the cross axis.
    • BThe child will ignore the align-self property.
    • CThe child will be centered along the main axis.
    • DThe child will be centered both vertically and horizontally.
  3. 3.A developer uses `display: none` on an element. What happens to this element in terms of layout and accessibility?

    • AIt remains in the layout but is hidden from view.
    • BIt is removed from both the layout and accessibility tree.
    • CIt is removed from the layout but announced by screen readers.
    • DIt is hidden visually but remains in the accessibility tree.
  4. 4.An element with `display: inline-block` is not aligning correctly due to gaps between elements. What is causing this?

    • AThe elements are not using a grid layout.
    • BThe inline-block elements have inherent padding.
    • CThe elements are not using flexbox.
    • DWhitespace in the HTML is rendered as space characters.
  5. 5.A developer sets `overflow: hidden` on a parent element to fix collapsing margins. What unintended effect might this have?

    • AIt will prevent the element from resizing.
    • BIt will cause the element to ignore padding.
    • CIt may clip content and break sticky positioning.
    • DIt will make the element invisible.
  6. 6.What happens when `display: contents` is used on a wrapper element?

    • AThe wrapper is hidden but children are announced by screen readers.
    • BThe wrapper and its children are removed from the layout.
    • CThe wrapper is removed but children remain visible.
    • DThe wrapper remains but children are hidden.
  7. 7.A developer uses `margin-inline-start` in a left-to-right layout. What happens if the layout direction changes to right-to-left?

    • AThe margin will double in size.
    • BThe margin will be removed entirely.
    • CThe margin will remain on the left side.
    • DThe margin will automatically switch to the right side.
  8. 8.Which of the following properties will have no effect if applied to a child of a block-level parent with `display: block`?

    • Apadding: 10px
    • Bmargin: auto
    • Cgrid-column: 1 / 3
    • Dwidth: 100%