HTML Page Title


Lesson 32 of 58

Every web page needs a title. It is one of the most important parts of your page. The title tells people and search engines what your page is about.


The Title Element

The <title> element goes inside the <head> section of your HTML page. It is not shown on the page itself. Instead, it shows up in the browser tab, in bookmarks, and in search engine results.

Page Title Example

In the example above, look at your browser tab. You should see “My First Web Page – Learning HTML” written there. That text came from the <title> tag.


Where Does the Title Appear?

The page title shows up in three important places:

  • In the browser tab – When someone visits your page, the title appears at the top of the tab.
  • In bookmarks and favorites – When someone saves your page, the title becomes the bookmark name.
  • In search engine results – Google and other search engines show your title as the clickable headline in search results.
Tip: Go look at any website right now. Look at the browser tab. See the text there? That is the page title. Amazon says “Amazon.com. Spend less. Smile more.” Google says “Google”. YouTube says “YouTube”. Every page has one.

Why the Title is Super Important for SEO

SEO stands for Search Engine Optimization. It is the art of making your page show up higher in Google search results.

The page title is one of the most important things Google looks at. A good title helps Google understand your page. A bad title can bury your page on page 10 of search results where nobody sees it.

Here is how it works. When you search for something on Google, the big blue clickable headline you see is the page title. Google pulls that directly from your <title> tag.

A good title tells people exactly what your page offers. A bad title confuses people and they skip your result.


How to Write a Good Title

A good page title should be clear, accurate, and useful. Here are some tips:

  • Be specific – Instead of “Home”, write “Home – John’s Bakery”
  • Include important keywords – If your page is about chocolate cake recipes, put “Chocolate Cake Recipe” in the title.
  • Keep it short but descriptive – Aim for 50-60 characters. Google cuts off longer titles.
  • Put important words first – Start with the main topic, then add your brand name.
  • Make each page title unique – Every page on your site should have a different title.
Good Title Examples

That title tells you three things right away. It is about chocolate cake. It is an easy recipe. The website is called Bake with Jane.


Bad Titles (What to Avoid)

Here are examples of bad titles. Never use these:

  • “Untitled Document” – This is the default if you forget to add a title. It is terrible for SEO and looks unprofessional.
  • “Home” or “Page 1” – Too vague. Nobody knows what your page is about.
  • A super long title – Google will cut it off and add “…”. Keep it under 60 characters.
  • Keyword stuffing – “Chocolate cake, cake, chocolate, dessert, sweet, baking” This looks spammy.
  • No title at all – HTML still works, but it is a bad practice.
Bad Title Example (Dont Do This)

The Difference Between Title and H1

Beginners often confuse the <title> tag with the <h1> tag. They are different.

  • <title> – Goes in the <head>. Shows in the browser tab and search results. Not visible on the page itself.
  • <h1> – Goes in the <body>. Shows as a big heading on the page. People see it when they visit.

Sometimes they are similar, but they do not have to be exactly the same. Your title can be more detailed for SEO. Your h1 can be shorter and punchier for readers.

Title vs H1 Example

Full Example With Multiple Pages

If you have a website with several pages, each page should have its own unique title. Here is an example of a small website:

Home Page (index.html)
<title>>Welcome to Pizza Planet - Best Pizza in Town</title>
Menu Page (menu.html)
<title>Our Menu - Pizza Planet</title>
Contact Page (contact.html)
<title>Contact Us - Pizza Planet</title>

See how each title is unique but still connected to the brand? That is good practice.


Quick Summary

  • Every HTML page needs a <title> inside the <head>.
  • The title shows in browser tabs, bookmarks, and search results.
  • Titles are very important for SEO and Google rankings.
  • A good title is specific, includes keywords, and is under 60 characters.
  • Never use “Untitled Document” as your title.
  • Each page on your site should have a unique title.
  • The title is different from the h1 heading.

What Just Happened? Let Me Explain

  • The <title> tag might be small, but it is one of the most important tags on your page.
  • Google uses it to decide if your page is relevant to a search query.
  • People use it to decide if they want to click on your page in search results.
  • If you forget to add a title, browsers will show the file name or “Untitled Document”. That looks unprofessional.
  • Take 30 seconds to write a good title for every page you make. It is worth it.
Tip: Open VS Code and create three HTML files: index.html, about.html, and contact.html. Give each one a different title that describes what the page is about. Open each one in your browser and look at the tabs. See how each tab has its own unique title? That is how a real website works.

HTML Title Reference

Here is the tag we covered in this chapter:

Tag Description
<title> Defines the title of the HTML document (shown in browser tab, bookmarks, and search results)

Lesson 32 of 58