I am working with drupal8. I want to prioritise the h,h2 nd h3 tags when checking view source for SEO purpose.I have "Main navigation" before h1 tag.Either i want to remove the below html or hide from the view source.Is it possible for me to solve this issue?


Page structure is controlled by the theme you're using. It is possible to structure your HTML so that navigation comes after content in HTML source, even though it may appear to be visually "above" content (with the use of CSS).

You may want to change your templates and CSS to reorganize the order of things in your HTML, or use a theme that already does this out of the box.

You can completely remove the Block titles by entering <none> in the Block title configuration.

You can also change your theme output so Blocks don't use headings as their titles, although it's not clear how important that is for SEO.

There have been indications that if you have your main content properly structured with headings, having navigation before the content in HTML won't have negative consequences.

Related: Should block titles be <h2>?

How To Use H1-H6 HTML Elements Properly

D8: Cleanup HTML heading structure

How it started (D7): Navigation menus should be preceded by headings of the appropriate level (usually <h2>)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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