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.
What the head holds
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
<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>
| Tag | Does |
|---|---|
charset="UTF-8" | Correctly displays every character & emoji |
viewport | Scales the page properly on phones |
description | The 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):
<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
<title>Data Analytics Programme · Albero Academy</title><link rel="icon" href="/favicon.ico">
Linking CSS & JS
<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
- 01The <head> holds page metadata the visitor never sees but browsers/search engines need.
- 02Always include charset UTF-8, the viewport tag, and a description.
- 03Open Graph tags (og:title/description/image) control social link previews.
- 04The <title> is the tab label and Google headline — page first, brand last.
- 05Stylesheets go in the head; scripts at the end of the body (or with defer).
