Don't <div> elements increase the complexity of our HTML structure?



Adding <div> elements to our HTML document doesn’t seem to change anything on the page. What’s the point of nesting other elements within a <div>? Doesn’t this just increase the complexity of our HTML structure?


When using <div> tags as containers, it is true that our nesting might become more complex. However, the benefit is that if we create a thoughtful HTML structure we can more readily parse and target related content. In other words, there is often a trade-off between complexity and either readability or targetability. As developers, we want to find the right balance between creating enough coherent structure to enhance readability and targetability without venturing into “divitis” territory.

FAQ: Learn HTML Elements - Intro to HTML - Divs

what does a