Search engines and AI search tools read your page's HTML before they read anything else. The tags in that code tell them what a page is about, which version to index, how it should look in the results and how the content is structured. Get them right and you give every page a clear, consistent signal. Get them wrong and even strong content can struggle to rank.

Most of these tags are created for you by your CMS. On a WordPress website or a Shopify store, filling in the SEO title field writes the title tag and choosing "Heading 2" writes an H2. Knowing what sits behind those fields helps you use them properly and spot problems when something isn't working.

Below is a list of the SEO HTML tags that matter, what each one does and how to write it, with code examples throughout.

SEO HTML tags list: quick reference

Meta tags in the head section

  • Title tag: sets the page title shown in search results and browser tabs. A direct ranking signal.
  • Meta description: summarises the page in search results. Affects clicks rather than rankings.
  • Meta robots tag: controls whether a page is indexed and how it appears in results.
  • Canonical tag: tells search engines which URL is the main version of a page.
  • Viewport tag: makes the page display properly on mobile, which matters for mobile-first indexing.
  • Hreflang tags: point to versions of the page for other languages or regions.
  • Open Graph tags: control how the page looks when shared on social media. No direct ranking effect.
  • Meta keywords tag: lists keywords for the page. Ignored by Google.

HTML tags in the page body

  • Header tags (H1 to H6): structure the content into headings and subheadings.
  • Image alt text: describes an image for search engines and screen readers.
  • Links and rel attributes: connect your pages and describe the relationship to the linked page.
  • Semantic tags: label the parts of a page, such as the main content, navigation and footer.
  • Schema markup: describes the page in a structured format that can earn rich results.

HTML meta tags for SEO

Meta tags sit in the <head> section of your page. Visitors don't see them on the page itself but search engines read every one.

Title tag

The title tag is the single most important HTML tag for SEO. It's the clickable headline in search results and one of the strongest signals of what a page is about.

html

<title>Ecommerce SEO Agency in Nottingham | Imaginaire</title>

The title tag is not the same as the H1. The title tag sits in the head and appears in search results and browser tabs. The H1 is the visible headline on the page. They often say similar things but they don't have to match.

To write a good title tag:

  • Put the primary keyword near the start.
  • Keep it to around 50 to 60 characters so it isn't cut off in the results.
  • Make every title on the site unique.
  • Describe the page accurately. Google often rewrites titles that don't match the content.
  • Give people a reason to click, not just a list of keywords.

Meta description

The meta description summarises the page in the search results. Google has confirmed it isn't a ranking factor but a well-written description can earn more clicks and that traffic is what you're ranking for in the first place.

html

<meta name="description" content="Imaginaire is a Nottingham ecommerce SEO agency helping UK brands grow organic traffic and sales through technical SEO, content and links.">

Aim for around 150 to 160 characters. Include the primary keyword naturally, as Google often bolds the words that match the search. If you don't write one, search engines will pull text from the page instead and it may not be the most relevant part.

Meta robots tag

The meta robots tag tells search engines whether to index a page and whether to follow its links.

html

<meta name="robots" content="noindex, follow">

Pages are indexed and followed by default, so you only need this tag when you want to change that. Common values include:

  • noindex keeps the page out of search results. Use it for thank you pages, internal search results and thin filter pages.
  • nofollow tells search engines not to follow any links on the page.
  • nosnippet stops a text snippet appearing in the results.
  • max-snippet, max-image-preview and max-video-preview limit how much of your content can be shown.

A stray noindex is one of the most common reasons a page vanishes from Google, especially after a site launch where the staging settings were carried over.

Canonical tag

The canonical tag tells search engines which URL is the main version of a page when the same content is available at more than one address.

html

<link rel="canonical" href="https://www.imaginaire.co.uk/seo/">

Duplicate URLs are common on ecommerce sites, where filters, sorting options and tracking parameters all create new versions of the same page. A canonical tag points the ranking signals at the version you want to rank. Google treats it as a strong hint rather than a rule, so it needs to agree with your internal links and sitemap.

Viewport meta tag

The viewport tag tells browsers how to scale the page on different screen sizes.

html

<meta name="viewport" content="width=device-width, initial-scale=1">

Google indexes the mobile version of your site, so a page without this tag will display poorly on phones and can lose out as a result. Most modern themes include it but it's worth checking on older or custom-built sites.

Hreflang tags

Hreflang tags tell search engines which version of a page to show to people in different languages or countries.

html

<link rel="alternate" hreflang="en-gb" href="https://www.example.com/uk/"> <link rel="alternate" hreflang="en-us" href="https://www.example.com/us/"> <link rel="alternate" hreflang="x-default" href="https://www.example.com/">

You only need hreflang if you run separate versions of your site for different markets. Each version must link to all the others and to itself or the tags may be ignored.

Open Graph and social meta tags

Open Graph tags control the title, description and image shown when someone shares your page on LinkedIn, Facebook and other platforms.

html

<meta property="og:title" content="SEO HTML Tags: The Meta Tags and HTML Tags That Matter"> <meta property="og:description" content="The HTML tags that matter for SEO, with code examples."> <meta property="og:image" content="https://www.imaginaire.co.uk/images/seo-html-tags.jpg">

They don't affect rankings directly. They do make shared links look more professional, which helps them get clicked and shared again.

Meta keywords tag

html

<meta name="keywords" content="seo, html tags, meta tags">

The meta keywords tag was once used to tell search engines which terms a page should rank for. It was abused so heavily that Google stopped using it as a ranking signal years ago. You don't need it and filling it in won't help. Some SEOs remove it altogether because it shows competitors exactly which keywords you're targeting.

HTML tags for SEO in the page body

These tags sit in the visible content of the page and shape how search engines understand its structure.

Header tags (H1 to H6)

Header tags break content into a clear hierarchy, from the main H1 headline down to H6.

html

<h1>SEO HTML Tags</h1> <h2>HTML meta tags for SEO</h2> <h3>Title tag</h3> <h3>Meta description</h3> <h2>HTML tags for SEO in the page body</h2>

To use them well:

  • Use one H1 per page that describes the main topic and includes the primary keyword.
  • Use H2s for the main sections and H3s for subsections within them.
  • Keep the order logical and avoid jumping from an H2 straight to an H4.
  • Use headings for structure, not styling. If you only want bigger text, change it in the CSS.

Clear headings help search engines and AI tools pick out the answer to a specific question, which can help a page appear in featured snippets and AI-generated answers.

Image alt text

The alt attribute describes an image to search engines and to people using screen readers.

html

<img src="pallet-racking-warehouse.jpg" alt="Blue and orange pallet racking in a warehouse">

Good alt text describes what's in the image in a short, natural sentence. Include a keyword where it fits but don't force it in. Decorative images that add nothing to the content can use an empty alt="" so screen readers skip them.

Links and rel attributes

Links help search engines find your pages and understand how they relate to each other. Internal links pass authority around your site and guide visitors to the pages you want them to see.

html

<a href="https://www.imaginaire.co.uk/digital-marketing/ecommerce-seo/technical-seo">technical SEO services</a>

Use descriptive anchor text that tells people and search engines what's on the other end. Avoid "click here" where you can.

The rel attribute describes the link to search engines:

html

<a href="https://www.example.com/" rel="nofollow">Example</a> <a href="https://www.example.com/" rel="sponsored">Paid placement</a> <a href="https://www.example.com/" rel="ugc">Forum post</a>

  • nofollow asks search engines not to pass authority through the link.
  • sponsored marks paid links, adverts and affiliate links.
  • ugc marks links in user-generated content such as comments and forum posts.

Google treats all three as hints. Links to trusted, relevant external sources don't need any of these attributes and can add credibility to your content.

Semantic HTML and emphasis tags

Semantic tags label the parts of a page so search engines can tell the main content from the navigation, sidebar and footer.

html

<header>...</header> <nav>...</nav> <main> <article>...</article> </main> <footer>...</footer>

They're not a strong ranking factor on their own. They do make your page easier to parse, which helps search engines and AI tools find the content that matters. Emphasis tags such as <strong> work in a similar way. Bolding a key phrase draws the reader's eye and gives search engines a small clue about what's important, as long as you use it sparingly.

Schema markup

Schema markup describes your content in a structured format that search engines understand. It can make a page eligible for rich results such as review stars, FAQs, product prices and breadcrumbs. Google recommends adding it as JSON-LD in a script tag.

html

<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "SEO HTML Tags: The Meta Tags and HTML Tags That Matter", "author": { "@type": "Organization", "name": "Imaginaire" }, "datePublished": "2024-05-20", "dateModified": "2026-11-13" } </script>

Common types include Article, Product, Organization, LocalBusiness, BreadcrumbList and FAQPage. Structured data also helps AI search tools understand who you are and what you offer, which is a growing part of AI SEO.

How to add meta tags in HTML for SEO

How you add meta tags depends on how your site is built.

In a CMS: WordPress, Shopify and most other platforms have SEO fields on every page and product. In WordPress, a plugin such as Yoast or Rank Math adds fields for the SEO title, meta description, canonical URL and robots settings. In Shopify, scroll to the "Search engine listing" section at the bottom of a page or product to edit the title and description.

In raw HTML: add the tags inside the <head> section, before the closing </head> tag.

html

<!DOCTYPE html> <html lang="en-GB"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Ecommerce SEO Agency in Nottingham | Imaginaire</title> <meta name="description" content="Imaginaire is a Nottingham ecommerce SEO agency helping UK brands grow organic traffic and sales."> <link rel="canonical" href="https://www.example.com/page/"> <meta property="og:title" content="Ecommerce SEO Agency in Nottingham"> </head> <body> <h1>Ecommerce SEO Agency in Nottingham</h1> </body> </html>

Once your tags are live, check them by viewing the page source or using the URL Inspection tool in Google Search Console, which shows how Google sees the page.

FAQs

Which HTML tags are most important for SEO?

The title tag, meta robots tag, canonical tag and header tags have the most direct effect on how a page is indexed and ranked. The meta description, alt text, internal links and schema markup all support them.

Does Google still use the meta keywords tag?

No. Google ignores the meta keywords tag when ranking pages, so there's no SEO benefit to filling it in.

What is the recommended length for an HTML title tag?

Around 50 to 60 characters. Google cuts titles off based on pixel width rather than a fixed character count, so shorter titles are safer.

Do semantic HTML tags help SEO?

Slightly. Tags such as <main> and <article> help search engines understand which part of the page holds the main content but they won't lift rankings on their own.

Does the order of tags in the HTML head affect SEO?

The order of valid tags doesn't matter. What does matter is keeping invalid elements, such as images or iframes, out of the head. Google may treat them as the end of the head section and miss any meta tags that come after them.

Are meta tags a ranking factor?

Some are. The title tag is a ranking signal and the robots and canonical tags control what gets indexed in the first place. The meta description and Open Graph tags aren't ranking factors but they affect how many people click.

Get your HTML tags checked by an SEO agency

Missing, duplicated or conflicting tags are some of the most common problems we find during a technical SEO audit. They're also some of the quickest to fix.

Imaginaire is a Nottingham-based SEO agency working with ecommerce brands and B2B businesses across the UK. If you'd like a second pair of eyes on your site's HTML tags, get in touch and we'll take a look.