Skip to main content
Albero Academy

The Document Head & Metadata

Everything the visitor never sees but the browser and search engines need — meta tags, title, favicon, and linking CSS & JS.

Chapter 6HTML13 min readBeginner friendly
  • #HTML
  • #Metadata
  • #head

The <head> holds information about the page rather than page content. It's invisible to the visitor but tells the browser how to render the page, and tells search engines and social platforms how to describe it. Getting it right is quiet, high-leverage work.

Metadata, the page title, links to stylesheets, script references, the favicon, and social-preview tags all live in the head. None of it shows on the page.

Essential meta tags

the meta tags every page needs
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Job-ready data & tech programmes.">
</head>
TagDoes
charset="UTF-8"Correctly displays every character & emoji
viewportScales the page properly on phones
descriptionThe snippet Google shows under your title

For rich link previews on social media, add Open Graph tags (you'll go deeper in the SEO chapter):

social preview
<meta property="og:title" content="Albero Academy">
<meta property="og:description" content="Become job-ready in 6 months.">
<meta property="og:image" content="https://…/preview.jpg">

Title & favicon

tab name & icon
<title>Data Analytics Programme · Albero Academy</title>
<link rel="icon" href="/favicon.ico">

Linking CSS & JS

loading styles & scripts
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
…
<script src="app.js"></script> <!-- just before </body> -->
</body>

Stylesheets go in the head; scripts go at the end of the body (or use defer) so the page renders before the JavaScript runs.

Practice

Write a complete <head> for a course page: charset, viewport, a compelling title and description, a favicon, one Open Graph image, and a linked stylesheet. Preview how the title appears in the browser tab.

Key takeaways

  1. 01The <head> holds page metadata the visitor never sees but browsers/search engines need.
  2. 02Always include charset UTF-8, the viewport tag, and a description.
  3. 03Open Graph tags (og:title/description/image) control social link previews.
  4. 04The <title> is the tab label and Google headline — page first, brand last.
  5. 05Stylesheets go in the head; scripts at the end of the body (or with defer).