Web Browser Engineering Blog

Share this post

Chapter 5

browserbook.substack.com

Chapter 5

Pavel Panchekha
Apr 5, 2021
Share this post

Chapter 5

browserbook.substack.com

Chapter 5, Laying Out Pages, is out! This is the first chapter that really starts going into the deep browser internals, by introducing layout trees and the tree-based layout algorithm. Yes, there are trees beyond the DOM! (Not even just two, actually...) It’s a pretty complex chapter, with a lot of moving pieces, but the concepts it introduces are going to be at the center of a lot of what comes later: styles, events, and JavaScript.

With complex ideas you need a really simple presentation, so this chapter in particular required a lot of effort. I wanted the chapter to reflect some real-world browser weirdness (anonymous block boxes!) and to connect to the academic literature (attribute grammars!) but also emphasize core themes like the difference between the HTML and layout trees. After lots of redesigns and advice from readers of various drafts, I hope we did a good job.

One thing Chris and I realized, working on this chapter, is that to really understand some of these concepts it’s best to play with examples. So in this release we’ve included two interactive widgets. Please play with them; Chris and I will be working on making more widgets this next month, so we’re really hoping they’re useful.

If you like the chapter and the book, please share with your friends! We have a twitter account or the blog. And thanks as always for reading!

Share this post

Chapter 5

browserbook.substack.com
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 Pavel Panchekha and Chris Harrelson
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing