Confusing section in Chapter 5 (Laying Out Pages)
Closed this issue · 1 comments
MatthewKosloski commented
Hello! I've been reading through the book and following along. So far, I've really enjoyed the book, but there is this one section of Chapter 5 that is really confusing to me:
The layout tree has a 1:1 correspondence with the HTML tree.
- False. Some HTML elements have no corresponding layout elements while others have many layout elements.
- False. Some HTML elements have many corresponding layout elements, but every element must draw something.
- True. All HTML elements produce a single layout element, and every layout element must come from a source HTML element.
- True. The HTML tree gets pruned to only the elements that produce some layout material.
The layout method for some layout modes calls layout recursively. Where does this recursion bottom out?
- Only at a layout object with no children.
- It never bottoms out.
- Only at an InlineLayout object.
- Only at a DocumentLayout object.
What type of object is at the root of the layout tree? The intermediate nodes? The leaves?
- The root is a DocumentLayout, all other nodes are BlockLayout.
- The root is an InlineLayout, the intermediate nodes are DocumentLayout, the leaves are BlockLayout.
- The root and intermediate nodes are BlockLayout, the leaves are InlineLayout.
- The root is a DocumentLayout, the intermediate nodes are BlockLayout, the leaves are InlineLayout or BlockLayout.
I'm very confused by the formatting of this. Is this supposed to be a sort of "Checking your understanding" quiz in the middle of the chapter? If so, wouldn't it make sense to put it at the end? Or maybe add a heading indicating that this is a quiz. It took me a long time to realize that this was a quiz
pavpanchekha commented
Yeah, apologies, as you intuited this is a "checking your understanding" quiz; it's not supposed to be rendered on the website but was accidentally getting through. It's not on the website right now, so I think it's been fixed.