1

In the past it was encouraged to put things like navigation bars as low as possible on the DOM even if they would be displayed at the top of the page (e.g. with CSS position fixed)

That way the actual "content", the page title and body, etc. would appear as close to the top of the DOM as possible.

Does this still actually matter? Or can you indicate the content in other ways e.g. by placing navigation bars inside of <header> and/or <nav> elements so that Google realizes they are not part of the actual content, and then placing the important content inside of another element e.g. <main> to emphasize its importance.

1 Answer 1

2

This almost certainly doesn't matter anymore.

Personally I like to use specific HTML elements for different parts of the page. Just to help crawlers and people reading the code but it's not for SEO purposes.

The elements I typically use are:

  • <header>
  • <nav>
  • <main> or <article> for the main content of the page
  • <section> that typically goes inside an <article> tag.
  • <footer>

This answer elsewhere on stack exchange gives a great answer to this question. Can writing a floating navbar's HTML at the bottom of the page increase SEO?

1
  • 4
    While I agree this probably no longer matters, do you have any references to support this? It would be beneficial to add them to your answer if have any you can cite.
    – Trebor
    Dec 12, 2023 at 17:13

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.