Semantic HTML and SEO
Semantic HTML describes what content is, not merely how it should look. That gives browsers, search engines, and assistive technology a clearer picture of the page before you add a line of CSS.
<div> and <span> are useful generic containers, but they do not describe their contents:
<div></div><span></span>
Elements such as <header>, <main>, and <footer> do:
<header></header><main></main><footer></footer>
This does not mean replacing every div will suddenly move a page to the top of Google. Search ranking is not that simple. It does mean crawlers can identify the main content and understand headings, navigation, and supporting sections more reliably. The accessibility benefit is often more direct: landmarks give screen-reader users useful ways to move around a page.
The same page, with clearer structure
Here is a page built from generic containers:
<html>
<head>
<title>Your site</title>
</head>
<body>
<div id="header">
Logo, navigation.
</div>
<div id="main-content">
Main content
</div>
<div id="footer">
Footer
</div>
</body>
</html>
The visible result may be identical when those containers are replaced with semantic elements:
<html>
<head>
<title>Your site</title>
</head>
<body>
<header>
Logo, navigation.
</header>
<main>
Main content
</main>
<footer>
Footer
</footer>
</body>
</html>
The second version says which section is the header, which contains the main content, and which is the footer. That meaning is available to software without relying on class names such as main-content.
Use the element that matches the content when one exists, and keep <div> for cases where there is no meaningful element. Semantic HTML is a solid foundation for accessibility and discoverability. It is not an SEO trick, which is precisely why it is worth doing.