Which is the best way to divide my html with <div>s?

Hello,

If I understand correctly, with div you kind of divide your page in blocks?
How many div elements should I make in a standard page?
Thank you!

Depends on what you have in mind with your page. You can apply as many divs as you like!

And div is not the only tag you can use to structure your page. There is also a thing called semantic HTML where the tag names indicate what the element will be used for :wink:

https://www.w3schools.com/html/html5_semantic_elements.asp

3 Likes

To elaborate a little as well on what @janneslohmeijer has said…

Semantic HTML is preferable to a load of arbitrary <div>s floating around, not only because it helps other developers to make sense of your markup but also because it can be used by assistive technologies to make better sense of the page.

This isn’t to say that you can’t use the <div> tag, simply that there may be other more appropriate tags depending on context. :slight_smile:

2 Likes

Yeah I am often a man of small words :stuck_out_tongue: