Offshore Marketers
SEO

HTML Tags for SEO: 15 Essential Tags and How to Use Them

By Offshore MarketersUpdated Nov 16, 202611 min read
HTML Tags for SEO: 15 Essential Tags and How to Use Them
On this page

    HTML tags for SEO are the small pieces of code that tell search engines what a page is about, how it should appear in results, and which version of it should rank. Get them right and Google, Bing and AI answer engines can read, index and quote your pages with confidence. Get them wrong and even great content can be ignored, duplicated or shown with the wrong title.

    This guide covers every HTML tag that still matters for SEO, with copy-ready code, best practices and the mistakes we see most often when auditing client sites. It also flags the tags you can safely forget.

    TL;DR

    • The title tag, meta description, one clear H1, canonical tag and meta robots tag do most of the SEO work.
    • Alt text, hreflang, the viewport tag and link attributes handle images, languages, mobile and link trust.
    • Structured data (JSON-LD) and Open Graph tags shape rich results and social previews.
    • Meta keywords and rel=”next/prev” no longer help Google, so do not spend time on them.
    • Clean headings, schema and snippet controls also decide how AI search features quote your page.

    What Are HTML Tags for SEO?

    HTML tags are the building blocks of every web page. Some control how content looks. A smaller group exists mainly for machines: they describe the page, give instructions to crawlers or point to related versions. Those are the HTML tags for SEO.

    Most of them sit in the <head> section and are invisible to visitors. Others, like headings and image alt text, sit in the page body and help both users and search engines understand the content. Search engines read all of them when they crawl and index a page.

    HTML Tags for SEO: Quick Reference

    Use this table as a checklist. The priority column shows how much each tag usually affects rankings and click-through rate.

    TagWhat it doesPriority
    Title tagMain headline in search results and browser tabsHigh
    Meta descriptionSuggested snippet text under the titleHigh for clicks
    H1 to H6 headingsPage structure and topic signalsHigh
    Canonical tagNames the main version of duplicate pagesHigh
    Meta robotsControls indexing, link following and snippetsHigh
    Image alt textDescribes images for search and screen readersMedium
    HreflangLinks language and country versionsHigh for global sites
    Viewport metaMakes pages render properly on mobileHigh
    Link attributesMarks paid, user-generated or untrusted linksMedium
    Structured dataExplains entities and unlocks rich resultsMedium to high
    Open Graph and Twitter cardsControls link previews on social platformsMedium
    Core HTML tags for SEO: title, meta description, headings, canonical, robots and schema

    1. Title Tag

    The title tag is the single most important HTML tag for SEO. Google usually uses it as the clickable headline in search results, and it is a strong relevance signal for the query.

    <title>HTML Tags for SEO: 15 Tags That Matter | Brand</title>
    • Keep it to roughly 50 to 60 characters so it is not cut off on most screens.
    • Put the main keyword near the start, then the benefit, then the brand.
    • Write a unique title for every page. Duplicate titles confuse search engines and users.
    • Match the page. Google rewrites titles that look stuffed, vague or misleading, so a clear, honest title is more likely to be shown as written. Google explains how it picks title links in its Search Central documentation.

    2. Meta Description

    The meta description does not directly affect rankings, but it often becomes the snippet under your title, which affects how many people click.

    <meta name="description" content="Learn which HTML tags help SEO, with code examples and common mistakes to avoid.">
    • Aim for about 140 to 160 characters.
    • Answer the searcher’s question and give a reason to click.
    • Include the main keyword naturally. Google bolds words that match the query.
    • Write one per page. Google may still choose its own snippet if it fits the query better.

    3. Header Tags (H1 to H6)

    Headings give a page its structure. They help readers scan, and they help search engines and AI systems understand which topics the page covers and how they relate.

    <h1>HTML Tags for SEO</h1>
    <h2>Title Tag</h2>
    <h3>Title tag length</h3>
    • Use one H1 that states the main topic of the page.
    • Use H2s for main sections and H3s for sub-points. Do not skip levels just for styling.
    • Write headings as clear phrases or questions people actually search for.
    • Avoid using heading tags for design elements such as footer labels or buttons.

    4. Canonical Tag

    The canonical tag tells search engines which URL is the main version when the same or very similar content exists at several addresses, for example with tracking parameters, filters or print versions.

    <link rel="canonical" href="https://www.example.com/html-tags-for-seo/">
    • Add a self-referencing canonical to every indexable page.
    • Always use absolute URLs, including the protocol and preferred domain.
    • Point canonicals at pages that return a 200 status, not at redirects or 404s.
    • Treat it as a strong hint. Google can pick a different canonical if your signals conflict.

    5. Meta Robots Tag

    The meta robots tag gives page-level instructions to crawlers. Google lists every directive it supports in its guide to meta tags and attributes Google understands. Use it to keep thin or private pages out of the index and to control how your content is shown in snippets.

    <meta name="robots" content="noindex, follow">
    <meta name="robots" content="max-snippet:160, max-image-preview:large">
    • noindex keeps a page out of search results. Use it for thank-you pages, internal search results and staging pages.
    • nofollow asks crawlers not to follow links on the page. It is rarely needed sitewide.
    • max-snippet, nosnippet and max-image-preview control how much of your page appears in results.
    • Do not block a page in robots.txt if you want Google to see its noindex tag. A blocked page cannot be crawled, so the tag is never read.

    6. Image Alt Attribute

    Alt text describes an image for screen readers and for search engines, which cannot see images the way people do. It also helps your images rank in Google Images.

    <img src="html-tags-checklist.png" alt="Checklist of HTML tags for SEO including title, meta description and canonical">
    • Describe what the image shows in one short sentence.
    • Include a keyword only when it fits the description naturally.
    • Use an empty alt (alt="") for purely decorative images.

    7. Hreflang Tag

    If you publish the same content in several languages or for different countries, hreflang tells Google which version to show to which audience.

    <link rel="alternate" hreflang="en-us" href="https://www.example.com/us/">
    <link rel="alternate" hreflang="en-gb" href="https://www.example.com/uk/">
    <link rel="alternate" hreflang="x-default" href="https://www.example.com/">
    • Every version must list all the others, including itself. Missing return links break the set.
    • Use correct ISO codes: language first, then the optional country (for example en-gb).
    • Add an x-default for visitors who do not match any listed version.
    • Follow Google’s localized versions guide when you set up hreflang for the first time.

    8. Viewport Meta Tag

    Google indexes the mobile version of your pages. The viewport tag tells browsers to fit the page to the screen width, which is the foundation of a mobile-friendly site.

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

    Without it, phones show a shrunken desktop layout, users pinch and zoom, and engagement suffers.

    9. Link Attributes: nofollow, sponsored and ugc

    Link attributes tell search engines how much to trust an outbound link. Since March 2020, Google treats all three as hints rather than strict rules.

    <a href="https://partner.com" rel="sponsored">Partner offer</a>
    <a href="https://forum-user-site.com" rel="ugc">User link</a>
    <a href="https://unknown-site.com" rel="nofollow">Untrusted link</a>
    • sponsored for paid links, affiliate links and sponsorships.
    • ugc for links in comments, forums and other user content.
    • nofollow for any link you do not want to vouch for.
    • Leave normal editorial links to trusted sources without an attribute.

    10. Structured Data (JSON-LD)

    Structured data uses the schema.org vocabulary to describe the things on a page, such as an article, product, business, FAQ or event. Google recommends the JSON-LD format, placed inside a script tag.

    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Article",
      "headline": "HTML Tags for SEO",
      "author": { "@type": "Organization", "name": "Offshore Marketers" }
    }
    </script>
    • Mark up only content that is visible on the page.
    • Test every template with Google’s Rich Results Test and the Schema Markup Validator.
    • Use Organization schema sitewide so search and AI systems understand who you are.

    Read our full guide to schema markup for every type that can earn rich results.

    11. Open Graph and Twitter Card Tags

    Open Graph tags control how your page looks when it is shared on Facebook, LinkedIn, WhatsApp and many other platforms. Twitter card tags do the same for X.

    <meta property="og:title" content="HTML Tags for SEO">
    <meta property="og:description" content="15 HTML tags that still matter, with examples.">
    <meta property="og:image" content="https://www.example.com/og-image.png">
    <meta name="twitter:card" content="summary_large_image">

    They do not change rankings directly, but a clear title and image get more clicks and shares, which brings more visits and links. See our Open Graph guide for every property.

    12. Semantic HTML5 Elements

    Elements such as <header>, <nav>, <main>, <article> and <footer> describe the role of each part of a page. They help assistive technology and make it easier for crawlers to separate your main content from menus and boilerplate.

    • Wrap the main content of each page in a single <main> element.
    • Use <article> for blog posts and news items.
    • Use real lists (<ul>, <ol>) and tables (<table>) for list and table content.

    13. Language and Charset Tags

    The lang attribute declares the page language and the charset tag declares the character encoding. Both prevent display problems and help search engines serve the page to the right audience.

    <html lang="en">
    <meta charset="UTF-8">

    How to Audit Your HTML Tags

    You do not need to check every page by hand. A simple routine finds most problems in an afternoon.

    Five step audit process for HTML tags for SEO
    1. Crawl the site with Screaming Frog, Sitebulb or Ahrefs Site Audit.
    2. Review titles and descriptions for missing, duplicate, too long or too short entries.
    3. Check headings for pages with no H1 or several H1s.
    4. Check canonical and robots tags for accidental noindex tags and canonicals that point to the wrong page.
    5. Test structured data on each template and fix errors in Search Console.

    If you want a deeper check, our technical SEO guide covers crawling, indexing and site speed in detail.

    HTML Tags You Can Ignore

    • Meta keywords. Google confirmed in 2009 that it does not use the keywords meta tag for ranking.
    • rel=”next” and rel=”prev”. Google said in 2019 that it no longer uses them for indexing. Good internal linking does the job.
    • Meta refresh redirects. Use proper 301 redirects on the server instead.
    • Revisit-after and similar tags. Search engines decide their own crawl schedule.

    HTML Tags and AI Search

    AI Overviews, AI Mode, ChatGPT search and Perplexity all rely on the same crawled HTML. Pages that are easy to parse are easier to quote.

    • Clear headings phrased as questions help AI systems match a section to a query.
    • Short answers under each heading give answer engines a clean passage to cite.
    • Structured data confirms facts about your business, products and authors.
    • Snippet controls such as nosnippet, max-snippet and data-nosnippet also apply to how Google shows your content in its AI features, so use them with care.
    HTML tags for SEO to keep versus outdated tags you can ignore

    Common HTML Tag Mistakes

    • Leaving a sitewide noindex in place after a site launch.
    • Using the same title and meta description on many pages.
    • Canonical tags that point to redirected, broken or unrelated URLs.
    • Several H1s, or headings used only for font size.
    • Hreflang sets without return links or with invalid codes.
    • Structured data that describes content users cannot see.

    Conclusion

    A handful of HTML tags for SEO do most of the work: a clear title, a useful meta description, one H1 with a logical heading structure, a correct canonical and the right robots directives. Add alt text, hreflang, a viewport tag, link attributes, structured data and Open Graph tags, and search engines and AI answer engines can understand and present your pages exactly as you intend.

    If you want your tags checked across the whole site, our technical SEO services team can audit and fix them for you.

    Frequently Asked Questions About HTML Tags for SEO

    Which HTML tags are most important for SEO?

    The title tag, meta description, H1 and heading structure, canonical tag and meta robots tag matter most. They decide how a page is indexed, which version ranks and how it appears in search results.

    Do meta keywords still help SEO?

    No. Google does not use the meta keywords tag for ranking, and most other search engines ignore it too. You can leave it out.

    How long should a title tag be?

    Aim for about 50 to 60 characters. Longer titles are often cut off in search results, and Google may rewrite titles that do not describe the page well.

    Can a page have more than one H1?

    HTML allows it, but one clear H1 that states the main topic is easier for users and search engines to understand. Use H2 and H3 tags for sections.

    Is structured data a ranking factor?

    Not directly. It helps search engines understand your content and can make pages eligible for rich results, which often improves click-through rate.

    Keep reading

    All articles