I implemented website for my company. One of my focuses was using as semantic structure for the HTML as possible. So I used <section>s and marked each section properly with heading tag (<h1>-<h6>), as the spec requires.

After we finished the website the marketing department of our company requested that for SEO purposes we:

  • Change some of the <h2> tags to <h5>
  • Change some of the <h2>-<h6> tags to <p>
  • Wrap subtitles (not titles) of some sections in heading tags <h2>-<h6>

I understand that from SEO perspective they want to precisely control over what texts/keywords are getting processesed/associated by search engine crawlers. But then those changes would violate the semantics of HTML. Let's go through those problems one by one:


Downgrade some heading levels

If I downgrade a heading of level 2 to 4 or 5, I'll effectively have some heading levels omitted. That violates the specification of how heading tags should be used:

Sections may contain headings of a rank equal to their section nesting level. Authors should use headings of the appropriate rank for the section’s nesting level.

W3C spec

Avoid skipping heading levels: always start from <h1>, next use <h2> and so on.


Make headings use <p> tags instead

As soon as we change the headings of some sections to not use <h1>-<h6> tags, but some other tags like <p>, we are effectively having <section>s without headings. The spec says:

Each section should be identified, typically by including a heading (h1-h6 element) as a child of the section element.

W3C spec

I could not only change the heading to <p> but also remove the <section> tags around that section. And while it wouldn't be a violation of the spec itself, it would downgrade the quality of our markup, because from the semantic point of view the current separation in <section>s totally makes sense. Then each section requires a heading, and those texts are perfectly semantic headings for those sections.

Using heading tags for subtitles

For similar reasons they want some subtitles to be marked with <h1>-<h6> tags, because those texts are important to SEO. But then the spec says clearly:

h1–h6 elements must not be used to markup subheadings, subtitles, alternative titles and taglines unless intended to be the heading for a new section or subsection.

W3C spec


Is there a way to solve their problems without affecting the semantics of the markup?

Maybe there is a way to stay with the current markup (<section> and <h1>-<h6> untouched), but somehow tell search engine crawlers to use only some of the headings for their indexation? And to use subtitles for indexation without making them use <h1>-<h6> tags?


1 Answer 1


I don't want to question the skills of the marketing department who gave you this advice, but several h1s and therefore the different headings have no impact on SEO (if we put the keywords aside). See: https://searchengineland.com/multiple-h1s-wont-get-in-the-way-of-your-seo-google-says-322909

On the contrary, modifying the headings as requested could be detrimental to SEO since they do not respect the semantics.

To answer the question the only solution, it seems to me, would be to remove the sections, to remove certain titles (by replacing them with paragraphs for example). But, I'm not sure it's the best thing to do in terms of SEO and semantics ... I don't know of any way to prevent a tag from being read by googlebot.

The solution proposed in the link given by Kelvin will not work either. From the comments under the answer, it only works with Google Search Appliance.

  • 1
    Thanks for the answer. And no problem with questioning skills of my marketing department. To be honest, I'm actually questioning their skills a lot myself :P. I think they only care about SEO, without any care nor understanding of semantics of HTML. I'm trying to bridge that gap here. Sep 17, 2020 at 23:51
  • I added a precision to my answer which was a little hasty concerning the headings and which could lead to confusion. Headings count if you take into account the keywords they contain. However, this does not change the problem. If the structure is clear, it will be clear for bots, and these titles shouldn't be a problem (in my opinion & experience). On the other hand, trying to optimize them is another story. If really, something needs to be changed, I only see the solution to remove the sections.
    – Armand
    Sep 18, 2020 at 0:00

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.