In case you missed the latest podcast episode of Search Off the Record, Google's Gary Ilyes caused a stir when he commented that HTML structure is not very important for SEO.
He later clarified on Linkedin that “not very important” doesn't mean “not important at all.” However, the SEO controversy did not stop.
Never one to avoid controversy, I couldn't help but weigh in to clarify some commonalities and common misconceptions.
So, does HTML structure matter for SEO?
The answer is:
When Illyes talked about HTML structure, he was probably referring to things that SEOs care about:
- Number of H1 tags on the page.
- H tag order.
- something
<b>
or<strong>
Tag. - Using tables and CSS for styling.
- How high up the source code text is displayed.
These are all things I've seen SEO people discuss over the years, and some of them were important in the old days of SEO, but not anymore.
Before we dive into when HTML is and isn't important for SEO, there are a few caveats you need to understand.
HTML structure is still 100% important for accessibility.
However, accessibility is not a direct ranking factor and is therefore outside the scope of this article.
As others have pointed out in X, if your site is inaccessible, people are less likely to link to or click on it in the future. can It can affect your SEO rankings.
The recently updated Google SEO Starter Guide specifically talks about heading tags and accessibility and SEO.
“Ordering headings in semantic order is great for screen readers, but from a Google search perspective, using headings in order is fine, since the web is generally not valid HTML. , Google search rarely relies on semantic meaning hidden in HTML specifications.
There's also no magic, ideal amount of headings you need on any given page. But if you think that's too much, it probably is. ”
But what about the rest of the HTML structure?
The main issue here is your mental model of how search engines work. For most people, that model hasn't changed since the '90s when search engines were mostly lexical searches. That is, find the documents where the term is mentioned the most.
These search engines had a scoring feature that gave extra weight to the occurrence of bold terms and counted H1 more than H2.
Unfortunately for our mental models, search has moved away from a lexical approach and toward a semantic approach.
Semantic search converts content into vectors and uses algorithms such as BERT and RankBrain to interpret the “meaning” of the query and content. It's not just about finding out what words are in a query. In the process of converting content to vectors, much of the HTML is lost.
Not only vectors are involved here, but also rendering. Before search engines could render JavaScript to inspect the DOM, those days had to rely on HTML hints.
Just as algorithms such as Passagevert can be used to identify the most relevant snippets on a page, various algorithms can also be used to determine key headings. <h1>
Tag.
of course, <h1>
are the tips here, but so are font size, placement relative to the content, and the actual sentence itself. You've probably seen many SEOs mark up just a small part of their navigation with her H1, even though they have a huge 30 point text in the center of the screen. <span>
Tag.
In the past, search engines struggled here, but these days they are more often able to correctly identify this behemoth. <span>
Tag it as the “heading” of the page.
That doesn't mean you can't use proper H tags and nested elements. Remember that accessibility is still important when it comes to tipping off search engines. That way it's cleaner, easier, more accessible, and better overall. What I'm saying is that search engines aren't adamant about relying on markup.
Another misconception is multiple H1 tags. This is one of my biggest pet peeves.
With the introduction of HTML5 and various elements, it is completely normal (and in some cases required for accessibility) to include multiple H1 tags on a page. This does not affect your SEO efforts. (Unless you're keyword stuffing and marking everything up as H1, which may set off spam flags.)
So what do search engines do? (I can go into much more detail about information retrieval, and I'll oversimplify here because I'd love to do it over a beer any day.)
In short:
- These detect title tags, main headings (which may or may not be H1, H2, etc.), and body copy.
- It then performs both lexical (e.g. BM25) and semantic (e.g. cosine similarity) measures to determine the relevance of these sections to the query before feeding everything into the machine learning algorithm and ranker. Masu.
The important thing here is that they likely no longer care if it's H1 or H2, the algorithm just identifies it as the “headline” of the page.
The same goes for bold text, span tags, div tags, etc. It's all about whether the algorithm (like BERT) deems it relevant to the query.
Get the daily newsletter search that marketers rely on.
So where does HTML structure matter?
In fact, HTML structure can often make or break your SEO strategy.For example, the canonical tag <body>
Instead of <head>
You won't be able to see it.
Similarly, <div>
inside you <head>
When you add tags, the Googlebot version of Chrome automatically assumes you closed the head and forgot to start the body, moving some important SEO tags to the body where they can be ignored. there is.
You won't believe it when you see this so many times. All it takes is one person to accidentally paste the code in the wrong place in her Google Tag or her manager and the entire site is destroyed. For this reason alone, I tell my clients to make sure all of their SEO tags are ranking high. <head>
More than any other tag.
Other HTML coding techniques can also negatively impact SEO.
for example, <a>
tagged href
If the attribute is present, the site has <span>
and onclick=
Even if users can't tell the difference, search engines won't count it as a link. Please don't do this as it has accessibility issues.
For images, search engines <img>
tag with src=
attribute.Many lazy loading plugins src=
In favor of srcset=
as of my latest testing, works in modern browsers, but is not treated as an “image” by Google in image rankings.
I don't think these examples were what Illyes meant when he talked about HTML structure. I think he was referring to general discussions like nested headings and bold tags.
TL;DR
Should I worry about using H1, H2, etc?
Yes, as always, but not for SEO. Mark up in a way that is accessible and meaningful to users.don't stress about forcing it <h1>
Tags that are styled to look like regular text.
Need to validate your HTML?
Yes, but not for SEO rankings.Valid HTML is not a ranking factor, but it helps prevent technical issues that affect SEO and Accessibility work may be reduced. I'm a big fan of his W3C Validator.
Is HTML structure important for SEO?
it depends. (Sorry, I couldn't resist!) It's very important when markup makes it inaccessible or invisible. If you change the order of your headings or make your text bold and hope it will improve your rankings, it probably won't happen.
The opinions expressed in this article are those of the guest author and not necessarily those of Search Engine Land. Staff authors are listed here.