I have a <div> with an <h1> tag that I moved to the top of the page using CSS, but in the code, the <h2> tag comes before the <h1> tag. Is Google Crawler smart enough to read the CSS and know that the <h1> tag appears further up on the page?

Will this cause SEO issues or a penalty, or is this practice okay?

2 Answers 2


The only thing I can find are quotes from Mueller - implying that it doesn't really matter for SEO rankings, as to how you organise your heading tags. What's more important is that if Google understands your content, then it can present it better to users.

So… this question of… how should I order my H1, H2, H3, headings and what should the content be, that’s something from my point of view isn’t really that relevant.

So it’s not so much that suddenly your page ranks higher because you have those keywords there. But suddenly it’s more well Google understands my content a little bit better and therefore it can send users who are explicitly looking for my content a little bit more towards my page.

But it’s not that suddenly your page will rank number one for competitive queries just because you’re making it very easy for Google to understand your content.

All from Search Engine Journal


Check Google's recommendations:

Use a heading hierarchy and take the following items under consideration: ...Don't skip levels of the heading hierarchy. For example, put an <h3> tag only under an <h2> tag.

It is not clear the purpose for which you hide the semantic element H1 in a container with the non-semantic element <div>.

Mozilla about <div>:

As a "pure" container, the element does not inherently represent anything.

Mozilla about The HTML Section Heading elements:

<h1> is the highest section level...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.