0

It is my understanding that there should not be more than one <h1> tag on a page, and that the <h1> tag should be the site title, for SEO reasons.

If that is correct, why does WordPress allow users to insert <h1> tags into posts?

Also, would it be a good idea for theme designers to not style <h1> tags to discourage users from using them?

I have found that the Minileven mobile theme from Automattic (included with the Jetpack) uses <h1> tags to display post titles within pages. Why would they do that?

I have changed them to <h2> throughout the theme, as as far as I can tell (from looking at Google Web Master Tools), Google has specific mobile crawling spiders.

4
  • The way you markup your content doesn't really have anything to do with WordPress, this question would be better off on webmasters.stackexchange.com , marking close.
    – Wyck
    Oct 19, 2012 at 1:22
  • 1
    @Wyck: I am asking in the context of WordPress being a CMS and the question also regards WordPress themes which I have seen using post titles within multiple <h1> tags on the same page.
    – paradroid
    Oct 19, 2012 at 1:27
  • It doesn't matter, I can make a WordPress theme with 2 million h1 tags or none. It is up to the the theme's author and you on how you mark up your content, WordPress is not doing it, and the question itself is irrelevant even if it was on topic.
    – Wyck
    Oct 19, 2012 at 2:04
  • @Wyck: I'm making a WordPress theme to be used in WordPress, which is why I wanted to know.
    – paradroid
    Oct 19, 2012 at 2:19

1 Answer 1

3

It is my understanding that there should not be more than one <h1> tag on a page, and that the <h1> tag should be the site title, for SEO reasons.

But that’s your opinion, not a rule. From an accessibility perspective the h1 should be used for main content’s title, on a single page that is the post title, on a list (archive), the archive title. Otherwise, a user exploring the content per headline hierarchy has no idea what this page is about. Screen reader users do that very often.

WordPress is not made for some obscure SEO voodoo (sorry ;)), it is for real people. These are different, they have different needs and different opinions. And that is the reason why you can use any headline level on any page.

Also, would it be a good idea for theme designers to not style <h1> tags to discourage users from using them?

Users would just edit the theme file, create a child theme or use a better theme. Not a good idea. You could filter the content on save_post and turn h1 elements into h2 elements. I would not do that.

The elements WordPress does not allow per default are mostly potential security problems: embeds and scripts. And even that can be overridden.

4
  • How would you explain Automattic using multiple <h1> tags for post titles on archive lists?
    – paradroid
    Oct 19, 2012 at 1:47
  • I cannot explain why other authors do that. As long as there is no real h1 (read: archive title) it is okay. The natural hierarchy should be kept intact, that’s the most important point.
    – fuxia
    Oct 19, 2012 at 1:53
  • Thanks. I think I am going to make page.php and single.php files display the page/post-title as the <h1> and the site-title for <h1> on all other pages, and change the rest to <h2>, as Google's opinion is as close to a rule we are going to get here.
    – paradroid
    Oct 19, 2012 at 2:03
  • 1
    Don't worry about more than one h1. Things have changed with html5. This is how Matt Cutts is thinking about it youtube.com/watch?v=GIn5qJKU8VM Basically he is saying nothing wrong with it as long as you don't overdo it.
    – mirage
    Oct 19, 2012 at 5:44

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.