Programming

Webpage metadata: head and meta

title, meta charset, viewport, description, favicon.

All lessons · HTML lessons: learn from scratch

Title and description

<title> is the heading shown in the browser tab and in search results; it should be unique and clear for every page. <meta name="description"> can become the short blurb in search results; 150–160 characters are enough.

<meta name="description" content="Daily fresh bread, pastries and coffee in the centre of Baku.">
<link rel="canonical" href="https://example.com/bread">

Social sharing and language

Open Graph tags decide how a link looks when shared: og:title, og:description, og:image. <html lang="az"> declares the document language; hreflang links point to alternative languages.

<meta property="og:title" content="Fresh bread in Baku">
<meta property="og:image" content="https://example.com/cover.jpg">
<link rel="alternate" hreflang="en" href="https://example.com/en/bread">

Author: Nibras Code