HTML Title Tag: Page Title Inside <head>

The HTML <title> element defines the title of the document. It belongs inside the <head> element and is commonly shown in the browser tab, bookmarks, history entries and search results.

<title>HTML Title Tag Tutorial | plus2net</title>
The title is not displayed as normal page-body content. Use an <h1> for the visible main heading of the page. The title and H1 can be similar, but they serve different purposes.
HTML document title displayed in a browser tab
Browser tab showing the document title.

Basic Title Syntax Top ↑

Place the title text between the opening and closing <title> tags:

<title>HTML Title Tag with Examples</title>

A document should have one meaningful title element in its <head>.

The old version of this tutorial used an HTML 3.2 doctype and a meta keywords tag. A modern HTML document starts with the short HTML5 doctype and does not need a meta keywords tag.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>HTML Title Tag Tutorial | plus2net</title>
  <meta name="description" content="Learn how the HTML title element works.">
</head>
<body>
  <h1>HTML Title Tag</h1>
</body>
</html>

See HTML <head> and HTML meta tags.

Where the Title Is Used Top ↑

The document title can be used in several places:

  • browser tabs and windows,
  • bookmarks or favourites,
  • browser history,
  • search-engine result title links,
  • other tools that need a human-readable page name.
A search engine may use the HTML title as the result title, but it can also generate a different title when it believes another label better represents the page. The <title> remains an important source, but it is not a guarantee of the exact text displayed in search results.

Title vs H1 Top ↑

The title element belongs in the document head. The <h1> belongs in the visible page body.

<head>
  <title>HTML Forms: Complete Beginner Guide | plus2net</title>
</head>
<body>
  <h1>HTML Forms</h1>
</body>

The two can communicate the same topic without being character-for-character identical.

See HTML headings.

Title Tag and SEO Top ↑

A useful page title should accurately describe the page and help a searcher understand what the page contains before clicking.

For example:

Poor:
Home Page

Better:
MySQL LEFT JOIN Tutorial with Examples | plus2net

Good titles are usually:

  • specific to the page,
  • descriptive and readable,
  • consistent with the visible content,
  • different from titles used on other pages,
  • free from unnecessary keyword repetition.

The earlier version of this tutorial recommended placing several targeted keywords in the title. Modern practice is better framed as describe the page clearly using natural language. Important search terms can appear naturally when they accurately describe the topic.

How Long Should a Title Be? Top ↑

There is no HTML rule that limits a title to about 75 characters. Browsers can store longer titles, and search-result displays are not based on one fixed character count.

Instead of targeting an exact number, make the important meaning clear early and remove words that do not help identify the page.

Too vague:
Tutorial Page

Needlessly repetitive:
HTML Title, HTML Title Tag, HTML Page Title, Title HTML Tutorial

Clear:
HTML Title Tag: Syntax and SEO Examples | plus2net

Keywords Without Stuffing Top ↑

If the page teaches HTML tables, the main topic naturally belongs in the title:

<title>HTML Tables: thead, tbody, th and Accessibility | plus2net</title>

Avoid repeating variants only to influence search ranking:

<!-- Avoid repetitive keyword stuffing -->
<title>HTML Table, HTML Tables, Table HTML, HTML Table Tutorial</title>

Write for users first while accurately naming the topic.

Use a Unique Title for Each Page Top ↑

Different pages should normally have different titles so users and search systems can distinguish them.

Page 1:
<title>HTML Checkbox: checked, value and Multiple Choices | plus2net</title>

Page 2:
<title>HTML Radio Button: name, value and checked | plus2net</title>

A shared site or brand suffix can remain consistent while the page-specific part changes.

Special Characters in a Title Top ↑

Characters that have special meaning in HTML should be written safely when needed. For example, use &amp; to represent an ampersand in source:

<title>HTML &amp; CSS Tutorials | plus2net</title>

The browser displays:

HTML & CSS Tutorials | plus2net

Dynamic Titles Top ↑

Server-side applications can generate page-specific titles before sending the HTML document to the browser.

<?php
$page_title='HTML Form Tutorial | plus2net';

echo '<title>'
    .htmlspecialchars(
        $page_title,
        ENT_QUOTES,
        'Windows-1252'
    )
    .'</title>';
If a title contains dynamic or user-controlled data, HTML-escape it before output. Do not insert untrusted text directly into the document head.

Common Title Tag Mistakes Top ↑

Using an obsolete HTML doctype Top ↑

Use the modern <!doctype html> declaration for HTML documents.

Adding a meta keywords tag for SEO Top ↑

The meta keywords tag is not needed for modern HTML page optimization. Focus on useful content, a descriptive title and an accurate meta description.

Using the same title on many pages Top ↑

Give each distinct page a title that identifies its own subject.

Using only generic text Top ↑

Titles such as Home, Page 1 or Untitled Document provide little context when several pages appear in tabs, bookmarks or search results.

Keyword stuffing Top ↑

Repeated keyword variants make the title harder to read and do not improve the usefulness of the page.

Assuming a fixed 75-character limit Top ↑

HTML does not impose that limit, and search displays vary. Prefer clarity over an arbitrary character target.

Putting visible page content only in title Top ↑

The title is document metadata. Use visible headings such as <h1> to identify the page topic inside the body.

Exercise Top ↑

Create a page with the title My Name and Address. Use the my_page.htm page created in the HTML body tag tutorial.

Add the title inside the page's <head>:

<title>My Name and Address</title>

Then add an H1 inside the body so the page also has a visible main heading.

Frequently Asked Questions Top ↑

Q1: Where does the HTML title tag go?

The title element belongs inside the head element of the HTML document.

Q2: Is the title tag visible inside the web page?

Not as normal body content. Browsers commonly show it in the tab or window title, while the page body should use visible headings.

Q3: Should every page have a unique title?

Distinct pages should normally have descriptive titles that identify their individual content.

Q4: Is there a 75-character limit for HTML titles?

No. HTML does not impose a 75-character title limit. Keep titles concise and descriptive rather than targeting one fixed character count.

Q5: Does Google always show the HTML title in search results?

No. The title element is an important source, but search engines can generate a different result title when they choose another representation of the page.

Q6: Should I add several keyword variations to the title?

No. Use natural, descriptive wording that accurately identifies the page instead of repeating keyword variations.

Q7: What is the difference between title and H1?

The title belongs in the document head and names the document. H1 is a visible heading in the page body.


HTML Meta Tags BODY Tag Headings



plus2net.com










We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2026   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer