Table of Contents


Want to Boost Rankings?
Get a proposal along with expert advice and insights on the right SEO strategy to grow your business!
Get StartedIn a recent episode of Search Off the Record, Google’s official Search Relations podcast, John Mueller and Martin Splitt from the Google Search team sat down for a detailed and revealing discussion on how Google interprets website code.
They talked about some common SEO myths, simple HTML mistakes and how messy or broken code can actually affect how your website shows up in Google Search.
Let’s be honest, when was the last time you checked if your homepage code was correct?
Free SEO Audit: Uncover Hidden SEO Opportunities Before Your Competitors Do
Gain early access to a tailored SEO audit that reveals untapped SEO opportunities and gaps in your website.
And what about adding keywords in your CSS class names or hiding them in HTML comments? Do those tricks help your Google ranking?
If you have been using shortcuts or hoping small code tricks would improve your SEO, this episode is a must-listen.
Demystifying SEO for developers
Can Broken HTML Still Rank? Why ‘It Works in the Browser’ Is Not Enough
Martin opened the discussion by debunking a common developer comfort zone: “If it renders, it must be fine.”
But as he explains, that ke only half the truth.
Make a simple mistake using <biv> instead of <div>. The browser will render the inner content just fine because it makes assumptions and treats unknown tags as generic containers.
But while that might not break the visual layer, it can derail your CSS, disrupt accessibility tools like screen readers, and more critically prevent Google from understanding the page structure.
Let me give you an example
You push a new theme live. Everything looks great visually. But your CSS selectors stop applying properly.
Your Core Web Vitals tank. Your sitemap validation starts throwing warnings. Weeks later, your rankings drop and it is traced back to a malformed layout container or missing src attributes on lazy-loaded images.
Martin even ran a W3C validator test on his own homepage during the episode and found an image with no src attribute due to a lazy-loading technique.
“One thing that is wrong,” he admitted, laughing nervously.
The point? HTML validators might feel outdated in the era of CI/CD pipelines and dynamic rendering but they still catch things that Googlebot notices and penalizes.
Should You Add Keywords in Comments or CSS Class Names for SEO?
Now let’s understand the myths.
John asked the loaded question: “Do keywords in CSS class names help SEO?” Martin didn’t hesitate: “No. Please don’t.”
And HTML comments? Even worse.
Let’s clear this up once and for all:
- Google downloads your entire HTML file, including comments and class names.
- But it does not process or index that data for ranking purposes.
- In fact, as Martin explained, the indexing pipeline strips out comments entirely.
Yet, these tactics remain popular in SEO forums and especially among beginner developers and content creators using low-code platforms. Adding keywords like <!– Best SEO Agency in Chicago –> into your code might make you feel clever, but it’s invisible fluff to Google.
Worse, it clutters your code and distracts from real optimization tasks.
Think of it this way: Would you add hashtags in the source code of a YouTube video and expect them to rank?
That is what inserting keywords in class names or comments is like.
Are SEO-Optimized Themes Real or Just Another Marketing Gimmick?
Themes are often overlooked in technical SEO conversations but this episode brought them front and center.
“Does switching your theme affect your SEO?”
“Can a ‘bad’ theme actually hurt rankings?”
Yes, and yes.
As John pointed out, a theme is not just a cosmetic shell but the generator of your site’s final HTML output.
If your theme is bloated, semantically incorrect or poorly structured, Google might struggle to parse the real content from layout chrome.
Martin introduced the concept of “div soup” , a theme outputting endless nested <div> elements instead of proper semantic tags like <article>, <section>, or <main>.
That kind of structure might look fine on the frontend but causes Googlebot to work harder and sometimes fail to extract the signal from the noise.
Consider these examples:
- A poorly structured theme may use a giant navigation menu in the <header>, pushing main content far down the page.
- Some themes rely on visual tricks (like font-size: 3em) for headings instead of using <h1>, <h2>, etc., which affects content hierarchy.
- Themes with excessive JavaScript or third-party plugin calls can delay critical content rendering, which directly impacts Core Web Vitals.
Switching to a cleaner theme that uses semantic HTML, optimized image loading, and fewer third-party scripts can not only improve accessibility. It can reduce crawl load, improve render efficiency and boost SEO.
But John offered a balanced view:
“It’s not a magic bullet. A better theme lays the foundation—it doesn’t fix thin content or poor linking.”
Do Core Web Vitals Actually Impact SEO Rankings?
Ah, the metrics developers love to chase.
Martin humorously pointed out how devs like to measure everything even when it is not meaningful. Core Web Vitals, however, are an exception.
They offer real actionable performance benchmarks that reflect how users experience your site.
But how much weight do they carry in Google’s ranking algorithm?
The truth, according to both John and Martin, is this: Core Web Vitals are a confirmed ranking factor but a minor one and only when all other things are equal.
This means:
- Improving LCP and FID won’t rocket you to position #1 if your content is irrelevant.
- But a poor CLS (layout shift) can frustrate users, increase bounce rates, and ultimately harm engagement metrics which can indirectly affect rankings.
- If you’re neck and neck with a competitor on quality, performance could give you the edge.
Here is a tip from the podcast: Don’t obsess over perfect PageSpeed scores. Focus instead on how quickly users can see and interact with the page. Use tools like Lighthouse and Chrome User Experience Report (CrUX) to monitor real-world performance.
Can You Lose Rankings Just by Changing Your Theme?
John posed this common scenario: You redesign your site using a new theme. The content does not change. But suddenly, rankings slip.
Why?
Because HTML output changed and sometimes dramatically.
Perhaps your new theme:
- Changed heading tag hierarchy (e.g., multiple <h1>s per page).
- Hide content in accordion menus that are hard for crawlers to parse.
- Added large image carousels with heavy JS that block rendering.
Martin emphasized that themes are more than skins. They restructure your content at a code level.
So yes, even a “simple” redesign can break your SEO if the theme is poorly built.
Here is a tip from experts that before changing your theme, crawl your current site (using Screaming Frog or Sitebulb) and compare structure post-change. Validate HTML output and measure CWV before-and-after.
Is It Time to Rethink Your Technical SEO Assumptions?
Absolutely.
After this podcast, I found myself revisiting assumptions I had not questioned in years. Like whether my theme’s clean UI matched clean HTML.
Whether lazy-loaded images were indexed. Whether performance optimizations were meaningful or just surface-level.
Martin and John didn’t offer a magic formula but they offered something better: clarity.
And above all stop looking for SEO shortcuts in hidden code. Focus instead on clarity, accessibility and performance.
About the author
Share this article
Find out WHAT stops Google from ranking your website
We’ll have our SEO specialists analyze your website—and tell you what could be slowing down your organic growth.
