Explain the concept of HTML document flow and how it can be controlled.
Instruction: Describe the normal document flow in HTML and methods to alter it.
Context: This question assesses the candidate's understanding of document flow in web design and their ability to manipulate it for layout purposes.
Updated
Official answer available
Read the opening below, then unlock the full answer and practical guidance.
HTML supplies structure; CSS defines layout. In normal flow, block-level boxes generally stack in the block direction, while inline content forms line boxes in the inline direction. These directions depend on writing mode and direction, so flow does not always begin at the physical top-left.
display chooses layout behavior. Flexbox arranges items along a main axis; Grid defines rows and columns...