Page Structure Lesson 28 of 42
The HTML Head — title, meta, link and Favicons
What goes inside the HTML head — title, meta charset, viewport, description, Open Graph tags for Facebook sharing, favicons, and linking CSS files.
The <head> is the backstage of your web page. Visitors don't see most of it, but it controls important things: the tab title, how your page looks on phones, how it appears in Google results, what preview shows when someone shares your link on Facebook or Messenger, and the little icon on the browser tab.
A complete head
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Grade 10 ICT Projects – Sample National High School</title>
<meta name="description" content="See the websites and programs made by our Grade 10 ICT students this school year.">
<link rel="icon" href="favicon.png">
<link rel="stylesheet" href="style.css">
</head>
Let's go through each line.
title — the most important line in the head
The <title> shows on the browser tab, in bookmarks, and as the big blue clickable headline in Google search results. A good title:
- describes the page specifically ("Chicken Adobo Recipe" — not just "Recipe" or "Home"),
- is about 50–60 characters, so Google doesn't cut it off,
- is different on every page of your site,
- often ends with the site name: "Contact Us – Kusina ni Lola."
meta charset
<meta charset="utf-8"> sets the character encoding so every letter and symbol (ñ, ₱, é, emoji) displays correctly. Put it as the first thing in the head.
meta viewport — essential for phones
<meta name="viewport" content="width=device-width, initial-scale=1"> tells phones to use the real screen width. Without it, the phone pretends to be a desktop screen about 980 pixels wide and shrinks everything, so your text becomes tiny. Since most Filipinos browse the web on phones, never forget this line. (More in the Responsive lesson.)
meta description — your page's "ad" on Google
The description is often shown as the gray text under your title in search results. It doesn't directly raise your ranking, but a clear, helpful description makes people more likely to click.
<meta name="description" content="Easy chicken adobo recipe with soy sauce, vinegar and garlic. Ready in 45 minutes, good for 4 people.">
Aim for about 150–160 characters, and write a unique description for every page.
Open Graph — how your link looks when shared
When you paste a link on Facebook, Messenger or Viber, a preview card appears with a picture, title and description. You control that card with Open Graph meta tags:
<meta property="og:title" content="Chicken Adobo – Kusina ni Lola">
<meta property="og:description" content="Our family's favorite adobo recipe, step by step.">
<meta property="og:image" content="https://www.example.com/images/adobo-share.jpg">
<meta property="og:url" content="https://www.example.com/recipes/adobo.html">
<meta property="og:type" content="article">
The image should be a full web address (starting with https://), ideally 1200 × 630 pixels.
Favicon — the tab icon
The favicon is the small icon on the browser tab and in bookmarks. Make a square image (at least 48 × 48 pixels; PNG or SVG), save it in your project folder, and link it:
<link rel="icon" href="favicon.png" type="image/png">
<!-- or a crisp SVG icon: -->
<link rel="icon" href="favicon.svg" type="image/svg+xml">
<!-- icon for iPhone home screens: -->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
Look at the tab of this page — that small green-and-yellow </> icon is this site's favicon.
link — connecting a CSS file
When your styles live in a separate file, <link> connects it to your page:
<link rel="stylesheet" href="css/style.css">
Every page of your website can link the same CSS file, so changing one file updates the design of the whole site.
style and script
The head can also contain <style> (CSS written directly in the page) and <script> (JavaScript). Scripts are often placed at the end of the body or loaded with the defer attribute, so the page content shows up first:
<script src="js/app.js" defer></script>
The lang attribute — one more thing
Not in the head, but closely related: <html lang="en"> (or lang="fil" for Filipino) tells browsers, translators and screen readers the language of the page. Screen readers use it to choose the correct pronunciation.
See it for yourself
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>You can't see me here!</title>
<meta name="description" content="This also doesn't show on the page.">
</head>
<body>
<h1>Only the body is visible.</h1>
<p>The title appears on a real browser tab. In this preview frame there's no tab, so you can't see it — but Google and the browser can.</p>
</body>
</html>
Quick Quiz
Check what you learned. Walang grade ito, practice lang. 🙂
By Sir Reyel · Last updated 2026-12-04