Gary Illyes from Google said that the HTML structure for your web pages does not matter much for rankings. He said this on the latest Search Off The Record podcast, saying, "I know that some people like to think that HTML structure matters all so much for rankings, but in fact, it doesn't matter that much."
Gary went on to explain that if every site on the internet had the same structure, it would make for "a very boring internet."
He added that "using headings and a good title element and having paragraphs, it's all great." "But other than that, I would think it's pretty futile to think about how the page... or how the HTML is structured, providing a template that works for any website that seems like an oxymoron to me."
In 2018, John Mueller said that clear content structure is helpful but won't hurt if you don't have a clear structure. He made it sound like it might be helpful to your users to have a clear structure but for ranking purposes, it won't matter either way. Google also said semantic HTML isn't a quality signal. Google has said SEOs sometimes overdo it with H1 elements and also moving them around won't matter for ranking.
Here is an embed when Gary said this:
So don't go nuts with your HTML structure for SEO purposes. Do what works best for your users and developers.
Update: Gary posted a comment on LinkedIn related to a question on this story.
Question: "Doesn't matter much" is not "it doesn't matter at all"
Answer: "Correct. It's just not something I would obsess about for ranking purposes. Internally I obsess about it because it makes my life easier when I have to write a shell script that mass-updates the docs, but eg. on my WordPress sites I couldn't care less about h1 following an h2, or having a block element in an inline element."
Forum discussion at X.