If the spacing in our HTML documents doesn’t affect the positioning of content on the page, why do we need to use 2-space indentations?
Experienced developers use indentation and vertical spacing to keep their code neat and legible. Highly readable code improves maintainability, aides collaborative efforts and makes for a better developer experience overall.
Within our HTML, consistent indentation should be used to illustrate nesting. For more info, check out this chapter.