Loading...

Using Page Titles in HTML

The page title appears in the browser tab when a user visits your site. Although it’s not part of the visible content, it plays a crucial role in user experience and search engine optimization (SEO).

Using the <title> Tag

The <title> element is placed inside the <head> section and contains a single text value that represents the page title.

html

<head>
  <title>My First Webpage</title>
</head>

Where Does the Page Title Appear?

The given title is displayed in the browser tab when the page is opened and also appears when the page is bookmarked.

Placement in the Document

The <title> tag should appear only once in an HTML document and must be placed inside the <head> section. Here's an example of a page with a title:

html

<!DOCTYPE html>
<html>
  <head>
    <title>Portfolio | Anna Kovács</title>
  </head>
  <body>
    <h1>Welcome to my page!</h1>
  </body>
</html>

Where Not to Place a Title

The <title> tag is only valid inside the <head> section. Placing it in the <body> will have no effect and may cause validation errors. HTML follows strict rules — always keep it within <head>.

Tips for Writing a Good Title

Use short but meaningful phrases. Include keywords, but write for humans too — this is what people see first. For example: 'HTML Course for Beginners – ReadyTools' is better than just 'Homepage'.

Why Is It Important for SEO?

Search engines use the title content when ranking pages. A well-written, keyword-rich title can help improve visibility in search results.

Common Mistakes

Common mistakes include omitting the <title> tag, using a title that is too long or uninformative, or repeating the same title on every page, which hurts SEO performance.

What’s the Ideal Length for a Title?

Most browsers and search engines display 50–60 characters of the title. It's best to stay within this range to avoid truncation.

Track Your Progress 🚀

Learn more easily by tracking your progress completely for free.


Top tools

CodeHubBoardly NEWLinksy NEWChromo NEW

Select Language

Set theme

© 2025 ReadyTools. All rights reserved.