Did an overview of HTML and CSS
Did you know it’s technically “illegal” in HTML to have more than one H1 on a page? I had no idea. Has that always been in the standard?
follow my journey
Did an overview of HTML and CSS
Did you know it’s technically “illegal” in HTML to have more than one H1 on a page? I had no idea. Has that always been in the standard?
This is an old (and semi-religious) debate. I’m pretty sure that no HTML spec has ever explicitly stated that multiple H1 tags on a page are forbidden. In HTML5 we have new elements to define different areas of a page (like , , and ) and each of those could also function as a standalone page and have its own H1 element.
Having only one H1 on a page has been considered good form and practice by many, but I’m pretty sure it’s never been in the spec. Back when I did “sneaky” SEO, I’d use CSS to make the H1 elements look like ordinary paragraph text and then use H1s all over the place to take advantage of the extra weight the search engine spiders gave them. Lots of people did that. Some probably still do.
I imagine the search engines have adjusted their algorithms to reduce the weight of H1s that are … wordy, so if anyone still does it, they’re probably not helping their search results much.
I’ve used H1’s liberally on pages whose purpose is, essentially, a user manual with multiple “chapters” on one page. Also, the home page of any blog is littered with H1’s, since each post begins with an H1. So I guess the point is rather moot.