The Page Title Tag
The <title> element sets the name of an HTML document. It lives inside <head>, and every page must have exactly one. Despite being a single line of text, it is arguably the single most important on-page SEO element you control.
Basic syntax
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Beginner's Guide to HTML Forms | Let Codes</title>
</head>
<body>
...
</body>
</html>Where the title shows up
Browser tab — the text shown on the tab itself, and in the window title bar.
Search engine results — rendered as the big, clickable blue link headline in Google/Bing results.
Bookmarks and browser history — the default label used when a page is saved.
Social media shares — used as a fallback headline when a page has no Open Graph title.
Browser tab groups and "recently closed" lists.
Why it matters for SEO
Search engines weigh the <title> heavily when deciding what a page is about and whether to show it for a given query. It is also the first thing a human sees in the results list — a clear, compelling title directly affects your click-through rate, which itself is a ranking signal.
Length guidance
There is no hard character limit enforced by HTML, but search engines truncate the visual title with an ellipsis once it exceeds roughly the width of the results snippet — commonly cited as about 50–60 characters, or up to ~600 pixels of rendered width.
Guideline | Recommendation |
|---|---|
Target length | 50–60 characters (roughly) |
Absolute minimum | A few descriptive words — never leave it empty |
Structure | Primary keyword/topic first, brand name last, separated by a pipe or dash |
Uniqueness | Every page on the site should have its own distinct title |
Good vs weak titles
<!-- Weak: vague, no keyword, no brand --> <title>Home</title> <!-- Weak: keyword stuffing --> <title>HTML HTML Tutorial Learn HTML HTML Guide HTML</title> <!-- Good: descriptive, unique, brand at the end --> <title>CSS Flexbox Guide for Beginners | Let Codes</title>
<h1> heading — they can (and often should) differ slightly, since the title is written for search results while the <h1> is written for the page itself.