Preferences

Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website. More information (Cookie Policy)

HTML Tags for SEO: Which Tags Matter, With Examples

HTML tags for SEO explained: title, meta description, robots, canonical, hreflang, headings, alt and schema, with examples and the tags Google ignores.

Published on
19/10/2026
Updated on
19/10/2026
Reading time
12 min
HTML Tags for SEO: Which Tags Matter, With Examples

Tools

On this page

In short

the HTML tags that matter for SEO fit in a short list: the title tag, the meta description, the meta robots tag, the canonical link, hreflang for multilingual sites, one clear H1 with logical H2 and H3 headings, alt text on images, rel attributes on links, the viewport tag, Open Graph tags and JSON-LD structured data. Google ignores the meta keywords tag and any meta tag it does not support. Put every important tag in the raw HTML, because some crawlers, including several AI crawlers, do not run JavaScript.

Want to go further? Ask

Quick quiz

Who should fix the technical side of your site?

Question 1 of 425%
What is happening today?

Search engines and AI assistants read your page as code before anyone sees it on screen. A handful of HTML tags for SEO decide how that code is understood: which URL gets indexed, which title appears in the results, what the page is about and how it looks when shared. Google lists the meta tags and attributes it supports on a single page of its Search Central documentation, and everything outside that list has no effect on Google Search. This guide covers each useful tag with an example, the mistakes to avoid and the tags you can forget.

Which HTML tags matter for SEO?

The table below is the reference list. Tags in the head describe the page to machines; tags in the body structure what people read.

TagExampleRole for SEOBest practice
Title<title>HTML Tags for SEO: Guide</title>Main source of the title link in Google resultsUnique per page, main keyword first, about 50 to 60 characters
Meta description<meta name="description" content="...">Often used for the snippet under the titleUnique, 120 to 160 characters, answer plus benefit
Meta robots<meta name="robots" content="noindex">Controls indexing and snippetsOnly on pages that must stay out of the index
Canonical<link rel="canonical" href="https://example.com/page">Names the preferred URL among duplicatesAbsolute URL, one per page, pointing to an indexable page
Hreflang<link rel="alternate" hreflang="fr" href="...">Links the language versions of a pageReciprocal links, plus an x-default version
Headings<h1> to <h6>Show the structure and topics of the pageOne clear H1, H2 for sections, H3 for sub-points
Image alt<img src="..." alt="...">Describes the image to Google and screen readersShort, descriptive, no keyword stuffing
Link rel<a href="..." rel="sponsored">Qualifies paid, user-generated or untrusted linkssponsored for paid links, ugc for comments and forums
Viewport<meta name="viewport" content="width=device-width, initial-scale=1">Signals a mobile-friendly pageOn every page of a responsive site
Open Graph<meta property="og:title" content="...">Controls the preview on social networks and messaging appsog:title, og:description, og:image, og:url on every page
JSON-LD<script type="application/ld+json">Structured data for rich results and machinesMatches the visible content, validated before release
Meta keywords<meta name="keywords" content="...">None: Google does not use itLeave it out

Which head tags control how Google shows your page?

The title tag

The title tag is the most important tag on the page. Google says there is no limit on the length of a title element, but the title link is truncated to fit the device width, which in practice means about 50 to 60 characters on desktop. Google can also rewrite it: its documentation lists the sources it uses, from the title element and the main visible title to H1 headings, the og:title tag and the anchor text of links pointing to the page. A title that matches the H1 and the page content is the one Google keeps. Write a unique title for every page, with the main keyword near the start and the brand at the end.

The meta description

The meta description does not change rankings, but it often supplies the snippet under the title and therefore influences clicks. Google may replace it with a passage of the page that better matches the query. Write it as a short answer followed by a benefit, between 120 and 160 characters, and never reuse the same description on several pages.

The meta robots tag

The robots meta tag tells crawlers what they may do with the page. The most used value is noindex, which keeps a page out of the results; others include nofollow, nosnippet and max-snippet, which limits the length of the text snippet. For files that have no head section, such as PDFs, the same directives go in the X-Robots-Tag HTTP header. A noindex left on a live template is one of the most common causes of lost traffic, so check it after every release.

Viewport and charset

Google states in its documentation that the presence of the viewport tag indicates a mobile-friendly page. Since Google indexes the mobile version of sites, this tag belongs on every page. The charset declaration (UTF-8 is Google's recommendation) prevents broken characters in titles and snippets, which matters on multilingual sites.

Which tags tell Google which URL to index?

Two link tags in the head manage duplicates and languages. The canonical tag names the preferred version when the same content is reachable through several URLs (filters, tracking parameters, HTTP and HTTPS). Google treats it as a strong hint, alongside redirects and internal links, so it works best when all signals point to the same URL. Use an absolute URL, keep one canonical per page and never point it to a page that is blocked or set to noindex.

The hreflang attribute tells Google which page to show to which language or region. According to Google's guide to localized versions, each version must list itself and all the others, and an x-default value can name the page for users whose language is not covered. Missing return links are the most frequent hreflang error: if page A points to page B, page B must point back to page A.

Which body tags help search engines understand the content?

Headings from H1 to H6

Headings give the outline of the page. Use one H1 that states the topic, H2 tags for the main sections and H3 tags for steps or items inside a section, without skipping levels for visual effect. Google has said that several H1 tags do not cause a penalty, but a single clear H1 remains the simplest structure for users and assistive technologies. Question-shaped H2 headings ("How does X work?") also match the way people phrase searches and prompts.

Alt text on images

Google explains in its image SEO guidelines that it uses alt text together with computer vision and the content of the page to understand an image, and that filling alt attributes with keywords may cause a site to be seen as spam. Describe what the image shows in a short phrase. Google also notes that it does not index CSS background images, so any image that should rank needs a real img element.

The a element is how crawlers discover pages, so internal links must be real links with an href, not buttons handled by JavaScript. The rel attribute qualifies outbound links: sponsored for paid placements, ugc for comments and forum posts, nofollow for links you do not want to endorse. Google has treated these values as hints since 2020. Descriptive anchor text helps both users and search engines.

Semantic HTML5 elements

Elements such as main, article, nav, header, footer and section tell machines which part of the page is the main content and which parts repeat on every page. They do not boost rankings on their own, but they make the main content easier to isolate, for search engines, screen readers and AI tools alike. Our guide to semantic HTML details each element. Inside the text, strong and em mark emphasis; use them for key terms, not whole paragraphs.

Which tags shape social previews and rich results?

The Open Graph protocol, created by Facebook and now read by most social networks and messaging apps, defines the og:title, og:description, og:image and og:url tags that build the preview card when a page is shared. Without them, platforms guess, often with the wrong image. You can test the result with an Open Graph preview tool before publishing.

Structured data in JSON-LD format, placed in a script tag, describes the page with the Schema.org vocabulary: article, product, organization, breadcrumb, FAQ. Google uses it for rich results, and it gives AI systems explicit facts about the entity behind the page. The markup must describe what is visible on the page. We cover its role for AI answers in our guide to structured data and AI search.

Header tags for SEO: how to use H1 to H6 headings

Header tags are the heading elements, H1 to H6, that label the sections of a page. Use one H1 for the topic of the page, H2 for its main parts and H3 for the points inside each part. Headings show the outline of a page to readers, screen readers and crawlers, so they should follow the logic of the content, not the size of the text.

What each level is for

Think of headings as a table of contents. The H1 names the subject of the whole page and should match your title tag closely. Each H2 opens a section that answers one question or covers one step. Each H3 narrows down the H2 above it. Skipping from an H1 straight to an H4 breaks that outline, and anyone who navigates by headings gets lost in the same way (see SEO accessibility).

Write headings that say what the section delivers

A vague heading such as "Tags" tells the reader nothing. A heading such as Which tags does Google ignore? tells them what they will get. Put the main term near the start, keep the heading short, and avoid repeating the same keyword in every heading. Near-identical H2s make a page look like a template rather than a plan. For a method to lay out your sections, see how to format a blog post.

Choose the level by structure, not by size

Many sites pick a heading level because its default font looks right. That is the most common mistake. Set the size and weight with CSS and keep the tag for the structure. A line in bold is not a heading, because the tag is what machines read. Check that the heading order still makes sense with the CSS turned off.

The header element is not a heading

The HTML header element is a container for the intro of a page, such as the logo, navigation and site name. It can hold an H1, but it does not replace one. Use the H1 for the page topic, not for the site name, which repeats on every page.

H1 HTML Tags for SEO: Which Tags Matter, With Examples
  H2 Which head tags control how Google shows your page?
    H3 The title tag
    H3 The meta description
  H2 Which body tags help search engines understand the content?
    H3 Headings from H1 to H6

Tip

Read only the headings, in order. If they read like a summary of the article, the outline works. If they read like a list of unrelated topics, rewrite the H2s before you change anything else.

Check your heading structure

List every heading on a page in order. You should see one H1, then H2 and H3 levels that never skip. A crawler can flag pages with no H1, several H1s or empty headings across a whole site. Also check the raw HTML: a heading that only appears after a script runs may be missing for AI crawlers that do not run JavaScript. For how the H1 works with the title, see H1 tag SEO.

Which HTML tags does Google ignore?

Google's list of supported tags also tells you what you can stop maintaining:

  • Meta keywords: Google states that the meta keywords tag is not used by Google Search and has no effect on indexing or ranking.
  • Unknown meta tags: Google ignores meta tags it does not support, such as meta author or meta revisit-after.
  • The lang attribute: Google detects the language of a page from its text, not from the lang attribute. Keep the attribute for accessibility and other tools, and use hreflang to link language versions.
  • Meta refresh as a redirect: it works, but Google recommends a server-side 301 redirect instead.

Do HTML tags matter for AI answers?

Yes, and for a simple reason: ChatGPT, Claude, Gemini and Perplexity extract passages from pages, and clean HTML makes those passages easy to find. Several AI crawlers fetch the raw HTML without running JavaScript, so a title, a canonical or a block of text injected by scripts may never reach them. A clear heading hierarchy splits the page into self-contained answers, lists and tables keep facts together, and structured data states the facts without ambiguity. This is the technical side of generative engine optimization: the same tags that help Google also help AI assistants quote you accurately.

How do you check the HTML tags of a page?

  1. Read the raw source. Open the source code (Ctrl+U) and search for the title, meta description, robots, canonical and hreflang tags. If a tag only appears in the rendered page, it depends on JavaScript.
  2. Compare with Google's view. The URL Inspection tool in Google Search Console shows the HTML that Google rendered and the canonical it selected.
  3. Audit page by page. The free Sorank Chrome extension lists missing or duplicate tags and the fixes for the page you are viewing.
  4. Audit the whole site. A crawler finds duplicate titles, missing alt text and wrong canonicals across thousands of URLs; our selection of technical SEO tools compares the options.
  5. Re-check after each release. Template changes are where noindex tags, broken canonicals and empty titles appear.

Getting the dozen tags above right covers almost everything HTML can do for SEO; the rest of the work is content and links. If you want pages that already ship with clean titles, headings, internal links and structured content, Sorank's article generator writes and publishes them on autopilot, from $79 per month billed annually (see pricing).

What are heading tags, and how should you use them?

Heading tags, from h1 to h6, label each block of a page so people and machines can see where one topic ends and the next begins. Use them to show the outline of your content, in order, with no level skipped. Never pick a heading tag to make text bigger or bolder: size belongs in CSS.

Why the order of levels matters

Many people who use screen readers jump from heading to heading, or open a list of every heading on the page, to find what they need. If your outline goes straight from h2 to h4, they are left wondering where the missing heading went. The MDN Web Docs reference on heading elements (last updated August 2026) says it is important “to not skip one or more heading levels” for this reason. For the wider set of fixes, see our guide to SEO accessibility.

Write the outline before the text

Draft the headings first, then fill in the paragraphs. Read only the headings, in order. They should name the topics of the page in a sequence a reader could follow on their own. If a heading would not work as a line in a table of contents, rename it. Our blog post formatting guide includes a heading template you can copy.

MistakeWhat it causesFix
A heading tag used to make text look biggerA false section in the outlineStyle the paragraph with CSS
Skipping a level, such as h2 straight to h4A gap that confuses screen reader usersUse an h3 for the sub-point
An empty heading, often an icon or a hidden labelA blank line in the heading listAdd text, or remove the tag
A div styled to look like a headingMachines see no section at allUse a real h2 or h3 element
A whole paragraph placed inside a headingA long outline that hides the topicsKeep headings short and specific

A clean outline in code

Here is the heading structure of a short help article. Each h2 is a question a reader might ask, and each h3 answers one step under it.

<h1>Indexing problems</h1>
<h2>Why is my page not indexed?</h2>
<h3>Check for a noindex tag</h3>
<h3>Check the robots.txt file</h3>
<h2>How long does indexing take?</h2>

Tip

Run any page through our free heading structure analyzer to list every H1 to H6 on the page, then check the order before you publish.

Frequently asked questions

How many H1 tags should a page have?

One H1 per page is the simplest and clearest choice. Google has said that several H1 tags do not cause a penalty, but a single H1 that states the topic helps users, screen readers and search engines understand the page at a glance.

Is the meta description a ranking factor?

No. Google presents the meta description as a possible source for the snippet shown under the title, not as a ranking signal. A clear description still matters because it influences how many people click on your result.

Do I need to edit HTML tags by hand in WordPress or Shopify?

Usually not. WordPress with an SEO plugin and Shopify generate the title, meta description, canonical and Open Graph tags from fields in the editor. Check the source code of a few pages anyway, because themes and apps sometimes add duplicate or conflicting tags.

Get your content plan for 30 days for free

We analyse your competitors, your website and your AI visibility to create a tailored content plan for free.

Our free SEO tools

See all our free tools

Get your content plan for 30 days for free

We analyse your competitors, your website and your AI visibility to create a tailored content plan for free.

Man with dark hair and beard wearing a light brown shirt speaks in front of a microphone on a podcast or recording setup.Portrait of a man with short dark hair wearing a white shirt and dark jacket, looking directly at the camera with a neutral expression.Man with short dark hair, beard, and clear glasses wearing a black t-shirt with a white circular logo, standing in front of a stone wall.Celio fabianoSmiling young woman with long brown hair wearing a red top and necklace, outdoors in a tree-filled background.Profile photo of Xavier Breull, Sorank customer
Google
Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.Solid yellow five-pointed star icon on transparent background.
5/5
+5,000
users

Testimonials from ambitious founders

0 to 10000 visitors in 5 months

Celio Fabianomonrobotlavevitre.frGoogleE-commerce

0 to 5000 visits in 8 months

Thibault BMsorank.comGoogleSoftware

0 to 1104 clicks in 4 months

Dominiqueflight-sensations-idf.comGoogleLeisure and aviation

0 to 163 clicks in 6 months

Coworking Pariscoworking-paris.frGoogleOffice broker

x92 clicks in 7 months

Guide Zanzibarguidezanzibar.comGoogleTravel