Metadata is data that describes other data, such as a webpage's title tag and meta description, an image's timestamp and camera settings, or a document's author and creation date. Search engines also use a page's meta description on their results pages.

Metadata in a page's head element is not part of the visible page text, though some of it, like a page's title tag, is visible to visitors in the browser tab. Other metadata, like Open Graph tags or HTTP headers, exists purely for machines and never appears on the rendered page at all.

Types of Metadata

The National Information Standards Organization (NISO) sorts metadata into three main types:

  • Descriptive: describes a resource so people can find and identify it.
  • Structural: shows how a compound object is put together, such as how pages are ordered into chapters.
  • Administrative: helps manage a resource, such as when it was created and who can access it.

Common HTML Meta Tags

  • <meta charset="utf-8"> declares the page's character encoding.
  • <meta name="viewport"> gives the browser hints about the initial viewport size.
  • <meta name="robots" content="noindex, nofollow"> asks crawlers not to index the page or follow its links. Only cooperative bots obey it.
  • <link rel="canonical" href="..."> names the preferred URL among duplicate pages. Google treats it as a strong signal, not a binding rule.
  • Open Graph tags such as og:title and og:image use the property attribute and shape how social sites preview a link. The protocol requires og:title, og:type, og:image and og:url.

Reading Metadata When Scraping

  • Most page-level metadata is in the <head>: the <title>, <meta> tags, the canonical link and Open Graph tags.
  • Structured data often comes as JSON-LD, a JavaScript notation inside a <script> tag in the <head> or <body>. Google recommends JSON-LD over Microdata and RDFa where a site's setup allows it.
  • Search results are not a reliable copy of a page's tags. Google generates title links automatically from sources that include the <title> element, <h1> headings and og:title, and builds snippets from page content, using the meta description only sometimes.