What in a page's HTML does Google use?
A handful of tags and the text. In the <head>, which visitors never see:
- the title tag, usually the headline in the results
- the meta description, sometimes the snippet
- the canonical tag: the address you want shown
- the robots meta tag, where
noindexkeeps a page out - hreflang links between language versions
In the <body> it's the H1 and other headings, the text, the alt text of images, structured data and the links. Google can generally only crawl a link that is an <a> element with an href.
The rest, class names and <div>s inside <div>s, is for the browser. It doesn't need to be tidy either: John Mueller of Google said in 2025 that HTML "doesn't have to be perfect, it'll still work".
How do you view a page's source code?
Right-click and choose View page source, press Ctrl+U (Cmd+Option+U on a Mac), or type view-source: before the address. Search it with Ctrl+F for <title, canonical, noindex or <h1.
View source or Inspect: which one does Google read?
Google reads the page after JavaScript has run. Most AI crawlers read only the source, so everything that matters belongs there.
View source shows what the server sent. Inspect shows the page after its scripts ran. On a site built in JavaScript, the source can be an empty container and Inspect the whole page.

Demo page, sample code.
Google "can only see content that's visible in the rendered HTML", though rendering can wait in Googlebot's queue. But it may skip rendering a page that says noindex, and it calls HTML the best way to set a canonical. Both belong in the source.
Vercel found in December 2024 that "none of the major AI crawlers currently render JavaScript".
Over the three months to late October 2026, 9 travel-guide articles of a holiday-home rental business brought 412 clicks from Google, 62% of its guide articles' clicks. In View source each is an empty shell: the homepage's title, no text, no links. Chrome turns the top one into a 2,175-word article, and Google ranks it at position 4.8 on average. A crawler that skips JavaScript reads that shell and nothing else. Whether that costs anything in AI search I couldn't measure. The risk sits on the guide's best pages.
No panic: for Google it works. But client-side rendering is slow, and AI is the future, so that's two very good reasons to switch on incremental static regeneration (ISR) or server-side rendering (SSR).
On the five sites I run, 559 of 561 pages read the same both ways. Boring, and boring is what you want on a client's site too.
To check one page, search View source for a sentence from the middle of the text. Not there? JavaScript adds it, and that's one for your developer. For your own page, Search Console renders it the way Google does: URL Inspection > Test live URL > View tested page > HTML.
A whole client site needs a site crawl. The SEO audit in MarketingTracer lists the pages its scan found that can't be indexed under "Page not indexable". Each gets its reason, such as a noindex in the robots meta tag or a canonical to another page. It shows what it read. URL Inspection shows what Google indexed.
Can one wrong tag in the head hide your canonical?
Yes: one element that doesn't belong in the <head> makes Google stop reading it. Google's rule for valid page metadata allows eight elements: title, meta, link, script, style, base, noscript and template. At anything else, such as an <img> or an <iframe>, Google "assumes the end of the <head> element". A canonical, hreflang or noindex below that point doesn't count.
To spot it, read View source from <head> down to your canonical: any other element above it is the problem. In Inspect the canonical then turns up inside <body>, because the browser closed the head early. Of 87 homepages I checked, six had a stray element in the head, such as a Facebook pixel <img>, all below the tags that count.