Course contentsShow
← Web Development
Lesson 84 of 2,9822. HTML FundamentalsFree lesson

The <title> Element

Crafting effective page titles that appear in browser tabs and search results.

The <title> Element

You'll learn how to write the page title that appears in browser tabs, bookmarks, and search engine results—making it one of the most important elements for user experience and discoverability.

What Is the <title> Element?

The <title> element lives inside the <head> and defines the name of your web page. Unlike most HTML you've learned so far, the title doesn't appear in the page itself—it appears outside the page content, specifically:

  • In the browser tab at the top of the window
  • In bookmarks when someone saves your page
  • In search engine results as the clickable headline
  • When someone shares your link on social media

Think of it like the spine of a book on a shelf: you don't read it while reading the book, but it's how you find and identify the book among all the others.

Writing an Effective Title

Every HTML document should have exactly one <title> element in the <head>:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Contact Us - Acme Corporation</title>
</head>
<body>
    <!-- Page content goes here -->
</body>
</html>

Best practices for titles:

  • Keep them concise (50-60 characters is ideal for search results)
  • Put the most important words first
  • Include your site name for branding: "Page Name - Site Name"
  • Make each page's title unique and descriptive
  • Avoid generic titles like "Page 1" or "Untitled"

Why It Matters

The <title> is often the first thing people see when they find your page in search results or have multiple tabs open. A clear, descriptive title helps users decide if your page has what they need.

Key Takeaway: The <title> element defines what appears in browser tabs and search results—make it clear, concise, and unique for every page.