Sometimes using div tags is not the best idea
The div and span tags are useful because they can be used in almost any situation, but that is not always a good thing. The tags themselves don't describe their contents like most other tags: If you see an h1 tag, you know it's a heading, but if you see a div, it could be anything. That is why it's recommended to use semantic tags whenever possible. These tags have more specific descriptions, but can still be used the same way, because they don't have any default formatting. Semantic elements make your code easier to read and navigate, and are oftentimes necessary for users with disabilities relying on assistive devices (like screen readers) to interpret the page correctly. Here are some common examples of semantic elements:
<nav>
<!-- for navigation, like the navbar links at the top of a page-->
</nav>
<article>
<!-- for content that can stand on its own, like the text of a news article-->
</article>
<section>
<!--a section of a document-->
</section>
<footer>
<!--information at the bottom of a page, like copyright info, contact details, etc.-->
</footer>