title
The browser tab title and common search result title.
Learn HTML Head with practical examples for structure, layout semantics, metadata, embedded content, scripts, accessibility, SEO and live practice.
HTML structure and layout
The head element is not visible page content. It contains metadata: title, character encoding, viewport settings, stylesheets, icons, preload hints and sharing information.
A strong head makes the page load correctly, scale on mobile, appear clearly in tabs and search results, and connect to CSS and scripts predictably.
Beginners often ignore head because it is invisible. Professionals treat it as production infrastructure.
The browser tab title and common search result title.
Character encoding for text rendering.
Required for responsive mobile layout.
Connects CSS, icons and resource hints.
Syntax and structure
Head is for information about the document. Body is for the document content people see.
<head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>HTML Head | Full Stack Masterclass</title> <meta name="description" content="Learn how the HTML head works."> <link rel="stylesheet" href="/assets/css/styles.css"> </head>
<head> <h1>Welcome to my site</h1> <p>This text belongs in body.</p> </head>
Rules that matter
Layout-focused HTML is strongest when meaning, grouping, metadata and behavior hooks all have a clear reason to exist.
UTF-8 prevents many character rendering problems.
Without it, mobile rendering often feels broken.
Every page needs a clear, specific title.
Description metadata helps search result clarity.
Stylesheet links belong in head in most normal pages.
Head content should not contain visible page sections.
Production thinking
This matters because invisible HTML can still decide how professional a page feels in browsers, search results and shared links.
The title helps users identify tabs and windows. A missing or vague title is a real usability problem.
Head quality affects SEO, sharing, icons, loading strategy, mobile behavior and brand polish.
Title and description metadata are among the most visible SEO-facing parts of a page.
Live code lab
Edit the HTML or CSS, then use Run to refresh the preview. The preview is isolated, so links and forms stay inside this practice area.
Mini assignment
Practice assignment
Try it yourself
Self-check
Do not only read this page. Answer these questions out loud or write the answers in your own notes. If one answer feels vague, revisit the examples before moving on.