×

html · level 3 · unit 5 · lesson 1

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

tells search engines what your page is, fact by fact.

A person can tell that a page is about a bakery. A search engine has to guess. removes the guessing: you list the facts in a fixed format, and results can show extras like opening hours and star ratings.

The usual format is JSON-LD, inside . This script never runs and is never shown: it only holds data. JSON is pairs of a and a value, like "name": "Crumbs", inside curly brackets.

"@context": "https://schema.org" says the keys come from Schema.org, a shared list that every big search engine uses. "@type" says what the page describes, like Bakery.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Crumbs Bakery | Fresh bread in York</title>
    <script type="application/ld+json">
      {
        "@context": "https://schema.org",
        "@type": "Bakery",
        "name": "Crumbs Bakery"
      }
    </script>
  </head>
  <body><h1>Crumbs Bakery</h1></body>
</html>

Press show my page to see it here.

The @ in @context and @type marks them as special keys that set up all the others.