CHAPTER 55 · HTML

Search-friendly pages and sharing metadata

Connect helpful visible content with accurate document information. Understand discovery, canonical addresses and sharing previews without promising search rankings.

Download example files (ZIP)

Search needs a useful page to understand

A well-labelled library book is easier to find, but a good label cannot replace useful pages inside. SEO, or search engine optimisation, includes making content easier for search systems to discover and understand. It starts with genuinely useful content for the intended reader.

Crawling means fetching resources. Indexing means processing content for possible inclusion in a search index. Ranking means ordering results for a particular search. These are different stages; publishing a file or adding metadata does not guarantee any particular stage or result position.

Write the answer before adding tags

State the page's subject clearly, organise its information with sensible headings and use plain sentences. Our workshop explains what the learner will practise instead of repeating a list of search phrases. Keep important information available as text, not only in a picture.

Choose descriptive link wording and real destinations. A normal anchor with href gives a useful discoverable route; a visually styled word with no working link does not. Avoid several nearly identical pages created only to repeat keywords.

Title and description should match the actual page

Each example has its own title and description because the workshop and checklist serve different purposes. The title identifies the document, while the h1 introduces its visible content. The description summarises that particular page.

A search engine may use these signals or choose other wording from the page. Do not promise an exact snippet, a fixed character cutoff or a ranking. A keywords meta tag does not improve Google web search rankings. Avoid false promises in metadata just as you would in body text.

Give a duplicate page a preferred address

Sometimes several URLs show substantially the same content, for example when a tracking parameter is added. A canonical link can indicate the preferred URL for that content. It is a signal to search systems, not a browser redirect or an access restriction. It also does not make two unrelated pages equivalent.

The checklist template shows one absolute HTTPS canonical address. Before publishing, replace its placeholder with the real preferred page address. Do not point every unrelated page to your homepage. Internal links, redirects and canonical signals should agree with the actual site structure.

Open Graph describes a shared link

Some sharing services read Open Graph metadata to build a preview card. The og:title names the shared item, og:type describes its type, og:url gives its identity address and og:image identifies a suitable preview image. Og:description supplies a summary; og:image:alt describes the image. These meta elements use property and content.

The example declares the og vocabulary prefix on html and shows the metadata as a template. It uses example.invalid as a deliberately non-working placeholder. Replace the page and image URLs with real public HTTPS resources before expecting a service to read them. The local HTML file remains readable, but these tags do not generate an image or upload the page.

A sharing preview is not a live guarantee

The provider decides which metadata it supports, how it crops an image and how long it caches a card. Editing a local file cannot update a previously cached remote card. Check the actual published URL and the provider's preview tools when available.

Use your own suitable image with an accurate description. Do not assume the same card dimensions or wording will be used by every service. Missing metadata may lead to a different preview rather than a broken visible page.

Keep the page reachable, readable and reasonably light

Use working internal links, stable addresses and images with appropriate dimensions and file sizes. Lazy loading can help below-the-fold media, but do not apply it blindly to the main image readers need immediately. Viewport metadata and responsive CSS support mobile reading; they are not substitutes for useful content.

For real translated versions, appropriate alternate-language links can use hreflang to describe their language relationship. Lang on an element describes content language; it does not itself connect translated URLs. A sitemap can list discoverable addresses, but listing one does not guarantee indexing.

Indexing controls are not passwords

Robots.txt gives cooperating crawlers access instructions. Noindex asks them not to index a resource they can read. If a crawler cannot fetch a page because it is blocked, it may not see that page's noindex instruction. Neither mechanism makes a public URL private.

Use real authentication when content needs restricted access. Before launch, check real URLs, page titles, descriptions, internal links, intended indexing policy and preview resources. This chapter teaches the preparation; it does not publish any file or enable indexing for the tutorial site.

Follow the idea

Prepare a page for discovery
  1. 1Write useful visible content
  2. 2Connect descriptive working links
  3. 3Match document and sharing metadata
  4. 4Check the real published resources

Metadata gives signals; it does not guarantee a rank or create a public image.

Complete program: search-workshop.html

Save this as search-workshop.html. Open it in your browser.

search-workshop.html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Link Practice Workshop | Practice Club</title>
    <meta
      name="description"
      content="Practise clear link wording, relative file paths and destination checks in a fictional student workshop."
    />
  </head>
  <body>
    <h1>Practise clear links in one short workshop</h1>
    <main>
      <p>
        This fictional workshop helps a beginner choose clear link text and test a saved
        destination.
      </p>
      <section id="tasks">
        <h2>What you will practise</h2>
        <ul>
          <li>Name a destination clearly.</li>
          <li>Match a relative address to its file.</li>
          <li>Test the link after saving.</li>
        </ul>
      </section>
      <p><a href="sharing-checklist.html">Read the link-testing checklist</a></p>
    </main>
  </body>
</html>
Browser previewDocument title: Link Practice Workshop | Practice Club

This preview shows the example in a browser. Save the complete code in local files to test links between pages and downloads. Same-page section links work here.

Expected result: a useful workshop page with a clear title, topic list and a working link to the checklist when both files are saved together. The metadata supports the same subject as the visible content.

Complete program: sharing-checklist.html

Save this as sharing-checklist.html. Open it in your browser.

sharing-checklist.html
<!doctype html>
<html lang="en" prefix="og: https://ogp.me/ns#">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Link-Testing Checklist | Practice Club</title>
    <meta
      name="description"
      content="A fictional three-step checklist for testing a workshop link and its return destination."
    />
    <link rel="canonical" href="https://example.invalid/practice/link-checklist/" />
    <meta property="og:title" content="Link-Testing Checklist | Practice Club" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="https://example.invalid/practice/link-checklist/" />
    <meta
      property="og:description"
      content="Check a workshop link and its return destination before sharing a page."
    />
    <meta property="og:image" content="https://example.invalid/assets/link-checklist-cover.png" />
    <meta
      property="og:image:alt"
      content="An original checklist cover showing three link-testing steps."
    />
  </head>
  <body>
    <h1>Check a link before sharing the page</h1>
    <main>
      <p>
        Check the wording, destination file and intended reading order before sharing your work.
      </p>
      <ol>
        <li>Save both HTML pages.</li>
        <li>Follow the workshop link to this checklist.</li>
        <li>Use the return link and confirm that it reaches the workshop.</li>
      </ol>
      <p><a href="search-workshop.html">Return to the link practice workshop</a></p>
      <p>
        The sharing metadata in this source is a template. Replace example.invalid addresses with
        your real published page and image addresses before use; it does not create a working social
        preview from local files.
      </p>
    </main>
  </body>
</html>
Browser previewDocument title: Link-Testing Checklist | Practice Club

This preview shows the example in a browser. Save the complete code in local files to test links between pages and downloads. Same-page section links work here.

Expected result: a checklist with a working return link. Its canonical and Open Graph addresses are visibly explained as placeholders, not live published resources. Replace them and supply the real image before testing an actual sharing preview.

Problem and solution

Problem: every page uses the same generic title and description, even though one explains a workshop and another checks links.

Solution: describe each page's actual purpose. Keep the visible heading, summary and linked content consistent, then test the real published addresses before assessing search or sharing results.

Common mistakes and useful tips

  • Do not promise rankings from metadata.
  • Do not repeat one vague title everywhere.
  • Canonical is a signal, not a redirect.
  • Replace placeholder URLs before publishing.
  • Open Graph does not create or upload an image.
  • Robots instructions are not access control.

Practice questions

  1. How do crawling and indexing differ?
  2. Why do the two examples use different titles?
  3. Does canonical redirect the browser?
  4. What does og:image identify?
  5. Will a local file automatically create a public sharing preview?
  6. Save both examples and test the forward and return links. Which metadata still needs real deployment details?
Check your practice answers
  1. Crawling fetches resources; indexing processes content for possible inclusion in a search index.
  2. They serve different page purposes and should be recognisable separately.
  3. No. It signals a preferred address to search systems.
  4. A preview image resource; it does not generate that file.
  5. No. The provider needs a reachable published resource and suitable metadata.
  6. The paired local links should work. The placeholder canonical, og:url and og:image require the actual published page and image addresses.

Interview questions

Why is useful content part of SEO?

A clear page gives readers an answer and gives search systems meaningful information to understand. Metadata cannot replace that substance.

When is canonical useful?

When multiple addresses contain substantially equivalent content and a preferred identity URL should be signalled consistently.

How do search metadata and sharing metadata differ?

They supply signals for different uses. A search engine may choose a result snippet, while a sharing service may read Open Graph to build its own cached card.

Why can a blocked page's noindex instruction be ineffective?

A crawler needs to read the page or relevant response to see that instruction. Blocking the fetch can prevent it from seeing noindex.

Quick revision

  • Start with helpful visible content.
  • Use accurate page-specific metadata.
  • Keep preferred addresses and links consistent.
  • Test real public resources and avoid ranking guarantees.