How do I write a useful page title in the HTML document head?
Quick answer
Put a descriptive, concise <title> element in the document’s <head>. Make it identify the particular page, not just the site, and put the most useful identifying words early. The title is document metadata shown in places such as browser tabs; it is not the same thing as the visible page heading. Keep titles for related pages distinct, even when they share a site or section name. [S1] [S2]
The question, the details, the next step.
A practical checklist
Write a short draft that names the specific page or task.
Put the page-identifying words early; add a site or section name only if it helps.
Compare titles for related pages and revise any that are indistinguishable.
Confirm the
<title>element is in the document head.Check that the visible page heading remains the body’s content title.
A few more useful answers
Should the document title and visible heading be identical?
They may share the main wording, but they serve different contexts. The document title identifies the overall document; the visible heading titles the page content. [S2]
Sources
References used for this guide.
- [S1] MDN: HTML document title element developer.mozilla.org · Checked
- [S2] MDN: Webpage metadata and the document head developer.mozilla.org · Checked
