top of page
  • GitHub
  • TikTok
  • Twitter
  • LinkedIn

Does HTML Structure Matter For SEO? (According to Google)

  • Writer: Kyle Place
    Kyle Place
  • Mar 2, 2022
  • 4 min read

Updated: Sep 27, 2024


html 3d logo


A long story short… best practices are best practices for a reason.


In the Search Off The Record podcast episode “Building a better website for Steve” Gary Illyes, John Mueller, and Martin Splitt are discussing what guidelines they would give to people who make websites.


The term guidelines seem to be fine and dandy for most of the conversion until they get to the technical aspects.


Then Martin Splitt switches from "guidelines" to "best practices", and with good reason.


Quote of the transcript for more context:


John Mueller: So what kind of guidelines or technical guidelines shall we have? What shall we include? Martin Splitt: Oh my! So with the technical guidelines--in this specific case, I don't like the word "guidelines" here because I think when we come to technical guidance, I believe it definitely is firmly in best practice land. Because, for instance, it does make our life a lot easier and it makes it a lot more reliable and reproducible if people are using valid HTML, if their HTML is valid according to the specification and they write HTML the way it was intended. Because then, we have a very clear-cut semantic and a very clear-cut structure of every document that you put on the web. John Mueller: So if my website is not valid HTML, it won't be indexed? Martin Splitt: That's exactly why I say "best practice" and not a "guideline" or a "policy," because of course, there are billions of websites out there, if not more, that are not written in valid HTML. They have some sort of HTML validation errors. If you would put it into a validator, it would have a problem. We can't just skip over that. So if you are writing an HTML page that is not valid HTML, we still want to index it because the content might be really, really good and useful for users. So we have to deal with that. But, obviously, the moment we are dealing with something where the semantics aren't clear, we might make mistakes or we might misunderstand something. We might misunderstand something is a title when it isn't, or is like a headline when it isn't, or is a link when it isn't, depending on what's the problem with the HTML that you wrote. But we have to be lenient, and we have to understand it.

(read the full transcript here and listen to the full episode here)


Key Takeaway

The job of Google (or any search engine) is to serve the highest quality and most relevant results to its users. So yes, content is king.


BUT that does not mean that there are not some technical best practices you should be following.


Valid HTML is one of these.


Here is an example of a basic (valid) HTML page:

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
	<title>Page Title</title>
</head>
<body>
	<h1>This is a Heading</h1>
	<p>This is a paragraph.</p>
</body>
</html>

Put it into an HTML validator, it will not have any errors. This is the way a webpage should be, in a perfect world.


Is valid HTML a ranking factor?

Who cares?


We can see that it isn’t (necessarily) a ranking factor. But it doesn't have to be, and that is the point.


H tags

I constantly make the point about H tags. Structure your H tags properly because you are supposed to, not because you expect to shoot straight to page 1.


example:

<h1>
	<h2>
		<h3>
		<h3>
	<h2>

Plus they are necessary for website accessibility.



image alt text

The same is true for image alt text. Call me crazy, but I am not a firm believer that they will make or break your SEO.


Do they help? Sure!

But do you really really need them for SEO. ehhh...I guess.


I use image alt text because you are supposed to! They are required for image accessibility (screenreaders use them).


Plus, sometimes images break or won't load and there is nothing worse for users than not knowing the context of the image that used to be there (the alt text is shown in its place)


Yes, I know that search engines read the alt text for more context, but that's almost secondary to me.


example:

<img src="kyle-place.jpg" alt="Kyle Place sitting in a chair">

So that's it?

Spend the time to write valid HTML because it's a best practice! Don’t skip ingredients in the recipe especially if you aren’t sure what they are for.


Your job as an SEO is 2 fold:

  1. Provide users with the best possible experience (relevant content, navigation etc)

  2. To make websites as easy as possible for search engines to understand.


That way users and the algorithm will actually understand the context and you can increase traffic and conversions.


Algorithms aren’t perfect and the web is a massive place, streamline the process to make sure your pages can be found, crawled and indexed.


Let’s make the web a better place, your website will benefit, your users will benefit and maybe, just maybe, your “SEO” and rankings will improve as well (and if they don’t… it's ok)


Check out the HTML style guide by W3Schools



About the Author: Kyle Place E-E-A-Ts, Sleeps and Breathes SEO. You can find him doing SEO, talking about SEO or learning about SEO.



 
 
bottom of page