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


#1

Question

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?

Answer

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
#2

what does a <div> mean


#3

If you’re talking about “a” in HTML/CSS, it stands for link. You can link pages/websites into your document using a href="...";


#4

The HTML Content Division element (<div>) is the generic container for flow content. It has no effect on the content or layout until styled using CSS.

see documentation:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div