You know what they say about having all your ducks in a row? Well, John Mueller of Google responded to a related question on Twitter around should you have to keep your header tags in your HTML, i.e. h1 tags before your h2 tags and so on, in order or not? John said it can help if you keep "clear structure on a page" but it won't "count it against a site if they improvise / get it wrong."
As you can see, he is saying two different things. If it helps to do it right, doesn't that mean it hurts to not do it right?
Here is the tweet:
It helps Google if there's a clear structure on a page, with headings & content, but we're not going to count it against a site if they improvise / get it wrong. That said, a clear semantic structure of a page can also make sense outside of search.
— John ☆.o(≧▽≦)o.☆ (@JohnMu) July 29, 2018
I think the short answer is that it doesn't really make a difference in rankings but John here is more concerned that if you are not following a clear and consistent path, that some code make eventually break and cause issues with crawling and indexing?
Previously John Mueller said having this out of order really doesn't impact ranking. I don't think that messaging has changed but hey - here it is for you to look at, test and make your own call about.
Forum discussion at Twitter.