KodingKaro
HTML · Intermediate · HTML Metadata and SEO

Social metadata, favicons, and structured data

Search snippets, social previews, structured data, and browser tabs use different metadata, so each signal should be selected deliberately.

✓ What you will learn in this topic

  • Explain the purpose of Social metadata, favicons, and structured data in a real HTML document.
  • Choose and apply the elements shown in both examples.
  • Recognize the specific mistake described in this lesson.

Concept explanation

Open Graph properties provide a title, description, and image for many social previews. A favicon link identifies a small site icon used by browser interfaces. JSON-LD can describe entities such as an organization or article for services that understand the vocabulary. Structured data must accurately match visible page content; it does not guarantee a search enhancement and should never describe hidden or invented facts. These metadata values supplement rather than replace the actual document.

Syntax

Add Open Graph properties, JSON-LD data, and a favicon link in head; keep every value accurate and consistent with visible content.

Example 1: a small page

The social values describe the page in a shared link preview; the favicon points to the site icon.

<meta property=\"og:title\" content=\"Meet the makers\">
<meta property=\"og:description\" content=\"Visit the people behind our handmade tools.\">
<link rel=\"icon\" href=\"/favicon.ico\">

Expected result: Supported sharing tools can show the title and description, and the browser can display the favicon.

Example 2: a practical page

The JSON-LD describes the organization and should be checked against the real public details on the site.

<head>
  <title>Meet the makers | North Workshop</title>
  <meta property=\"og:title\" content=\"Meet the makers at North Workshop\">
  <meta property=\"og:image\" content=\"https://example.com/images/makers-preview.jpg\">
  <link rel=\"icon\" href=\"/icons/workshop.svg\" type=\"image/svg+xml\">
  <script type=\"application/ld+json\">
  {\"@context\":\"https://schema.org\",\"@type\":\"Organization\",\"name\":\"North Workshop\",\"url\":\"https://example.com\"}
  </script>
</head>

Expected result: The browser tab and favicon use their metadata; social services may use Open Graph values, while JSON-LD is machine-readable and does not appear as page text.

Common mistakes

Do not copy the same title and description to every page or declare a canonical URL that points to a different content page.

Best practices

Give each page a distinct, accurate title and description, ensure canonical URLs are absolute and correct, and keep visible content aligned with metadata.

Practice exercise

Write the head section for a unique event page with title, description, viewport, canonical URL, social preview metadata, and a favicon reference.

Lesson summary

  • Social metadata and structured data serve different consumers and must faithfully describe the page.
  • Give each page a distinct, accurate title and description, ensure canonical URLs are absolute and correct, and keep visible content aligned with metadata.

Knowledge check

Does valid structured data guarantee a search engine will show a rich result?

Show the explanation

No. It describes content for compatible services but does not guarantee eligibility or display of an enhancement.

Practical example

html
<meta property=\"og:title\" content=\"Meet the makers\">
<meta property=\"og:description\" content=\"Visit the people behind our handmade tools.\">
<link rel=\"icon\" href=\"/favicon.ico\">

Expected result:

Supported sharing tools can show the title and description, and the browser can display the favicon.

Hands-on practice task

Write the head section for a unique event page with title, description, viewport, canonical URL, social preview metadata, and a favicon reference.

In this section

Other lessons in HTML Metadata and SEO

Broaden your knowledge

Related learning topics