Does HTML structure matter for SEO? – Search Engine Land
sel logo
Search Engine Land » SEO » Does HTML structure matter for SEO?
SearchBot requires a free Search Engine Land account to use, and gives you access to all SearchBot personas, an image generator, and much more!
If you already have a Search Engine Land account, log in now. Otherwise, register here!
In case you missed the latest podcast episode of Search Off the Record, Google’s Gary Ilyes stirred up some controversy when he made a comment about HTML structure not mattering much for SEO.
He later clarified on Linkedin that “not mattering much” doesn’t mean “doesn’t matter at all.” Still, that didn’t stop any of the SEO controversy.
Being unable to avoid controversy, I couldn’t help but jump in – in an attempt to clarify a few common points and misconceptions I keep seeing pop up.
The answer is: It depends.
When Illyes was talking about HTML structure, he was likely referring to some of the things SEOs like to obsess about:
These are all things I’ve seen SEOs discuss over the years, and while some of them mattered in the old days of SEO, that’s not how things work anymore.
Before diving into when HTML does and doesn’t matter for SEO, we need to get some caveats out.
HTML structure 100% still matters for accessibility.
Accessibility is not a direct ranking factor, though, so it’s a bit outside the scope of this article.
I will note, as others pointed out on X, that if your site isn’t accessible, it is less likely people will link to it or click on it in the future, so that can potentially affect your SEO rankings.
The recently updated Google SEO Starter Guide even specifically mentions heading tags and accessibility vs. SEO:
“Having your headings in semantic order is fantastic for screen readers, but from Google Search perspective, it doesn’t matter if you’re using them out of order. The web in general is not valid HTML, so Google Search can rarely depend on semantic meanings hidden in the HTML specification.
There’s also no magical, ideal amount of headings a given page should have. However, if you think it’s too much, then it probably is.”
The main issue here is our mental model of how search engines work. For most people, that model hasn’t changed since the ‘90s when search engines were mostly all lexical search. That is to say, finding the document with the most mentions of the term.
Those search engines had scoring functions that gave extra weight to occurrences of the term in bold and counted an H1 more than an H2, etc.
Unfortunately for our mental model, search has moved away from the lexical approach and more toward a semantic approach.
In semantic search, the content is converted to vectors and algorithms like BERT, RankBrain, etc., are used to interpret the “meaning” of the query and the content, not just looking at what words it contains. In the process of converting the content to vectors, most of the HTML is lost.
It’s not just vectors that come into play here but also rendering. Before search engines could render JavaScript and examine the DOM, they had to rely on HTML hints – but those days are gone.
Just as they can use algorithms like passage-bert to identify the most relevant snippet on the page, they can also use various algorithms to determine the main heading – even if it’s not in the
<h1>
tag. Sure,
<h1>
is a hint here – but so is font size, placement relevant to the content, and the actual sentence itself. We’ve all seen so many SEOs mark up a tiny bit of the navigation with an H1 despite having a giant 30-point text in the middle of the screen that’s just a <span>
tag. In the old days, search engines would struggle here, but these days, they can more often than not correctly identify that giant
<span>
tag as the “heading” of the page. That doesn’t mean you shouldn’t use proper H tags and nested elements. Remember, accessibility still matters to give the search engines a hint. It’ll be cleaner, easier, more accessible and just overall better if you do it. I’m just saying search engines aren’t stuck to relying on the markup.
Another misconception is the multiple H1 tags. This is one of my biggest pet peeves.
With the introduction of HTML5 and various elements, it’s completely normal (and, in some accessibility cases, required) to have multiple H1 tags on a page. This isn’t something that will affect your SEO efforts. (Unless you’re keyword stuffing and marking up everything as an H1, which may trip some spam flags.)
So, what does a search engine do? (I’ll over-simplify here as I could go in-depth on information retrieval and would love to do that over beers anytime.)
Simply put:
The takeaway is that they most likely no longer really care if it’s an H1 or H2 – just that their algorithm identified it as a “heading” of the page.
The same goes for bold text, span and div tags, etc. It’s all about whether the algorithm (e.g., BERT) says it’s relevant to the query.
Get the daily newsletter search marketers rely on.
See terms.
HTML structure can actually make or break your SEO strategy in lots of instances. For example, putting your canonical tag in the
<body>
instead of the <head>
won’t get seen. Likewise, if you put a
<div>
in your <head>
tag, then Googlebot’s version of Chrome will assume you forgot to close the head and start the body and do it for you, potentially moving some of your important SEO tags into the body where they will be ignored. You won’t believe how often I see this. It just takes one person to accidentally paste code into the wrong place in Google Tag Manager to break your whole site. For this reason alone, I tell clients to make sure their SEO tags are all higher up in the
<head>
than any other tags.Other HTML coding techniques can harm SEO, too.
For example, if instead of using an
<a>
tag with href
attribute, your site has a <span>
with an onclick=
event, search engines will not count that as a link, even though users won’t tell the difference. It’s got some accessibility issues, too, so please stop doing that.When it comes to images, search engines require an
<img>
tag with a src=
attribute. You’d be surprised how many lazy loading plugins omit the src=
in favor of srcset=
, which, as of my latest testing, works in modern browsers but isn’t treated as an “image” by Google for image ranking. I don’t think any of these examples were what Illyes meant when he talked about HTML structure. I believe he was referencing the common arguments of heading nesting, bold tags, etc.
Yes, always, but not for SEO. Mark stuff up in a way that’s accessible and makes sense for users. Don’t stress over forcing in that
<h1>
tag that’s styled to look like regular text. Yes, but not for SEO rankings. Valid HTML isn’t a ranking factor, but it will help prevent technical issues affecting SEO and potentially lessen your accessibility work. I’m a huge fan of the W3C Validator.
It depends. (Sorry, couldn’t resist!) If your markup causes stuff to be inaccessible or not seen, yes, it matters a ton. If you’re hoping to get a ranking boost by re-ordering some headings or bolding some text, it’s likely not going to happen.
Opinions expressed in this article are those of the guest author and not necessarily Search Engine Land. Staff authors are listed here.
Related stories
New on Search Engine Land
About the author
Related topics
Get the daily newsletter search marketers rely on.
See terms.
Learn actionable search marketing tactics that can help you drive more traffic, leads, and revenue.
Online Feb. 28-29: SMX Master Classes
Online June 11-12: SMX Advanced
Online Nov. 13-14: SMX Next
Discover time-saving technologies and actionable tactics that can help you overcome crucial marketing challenges.
April 15-17, 2020: San Jose
What Is SEO – Search Engine Optimization?
SEM career playbook: Overview of a growing industry
Web hosting for SEO: Why it’s important
Leverage AI-driven SEO to Increase Traffic, Revenue and Online Reputation
AI-Forward Marketing: Your Roadmap to Revenue Growth in 2024
Power Up Your Marketing Programs with Google Analytics 4 and Salesforce Marketing Cloud
Identity Resolution Platforms: A Marketer’s Guide
Email Marketing Platforms: A Marketer’s Guide
Customer Data Platforms: A Marketer’s Guide
9 SEO A/B test case studies to boost your travel site’s SEO performance
Meet your new AI-powered marketing assistant!
Get the must-read newsletter for search marketers.
Topics
Our events
About
Follow us
© 2024 Third Door Media, Inc. All rights reserved.
Third Door Media, Inc. is a publisher and marketing solutions provider incorporated in Delaware, USA, with an address 88 Schoolhouse Road, PO Box 3103, Edgartown, MA 02539. Third Door Media operates business-to-business media properties and produces events. It is the publisher of Search Engine Land the leading Search Engine Optimization digital publication.
source