Skip to content

04. title Tag

The <title> element defines the document’s title that appears in the browser tab, bookmarks, and search engine results. It’s a crucial element for user experience, SEO, and accessibility. Every HTML document should have exactly one title element in the head section.

<head>
<title>My Web Page</title>
</head>

The title appears in the browser tab:

[Tab Icon] My Web Page

When users bookmark a page, the title is used:

Bookmarks
└─ My Web Page

Search engines display the title in results:

My Web Page
https://example.com
Description of the page...

Titles appear in browser history.

  • 50-60 characters: Optimal length for search results
  • Descriptive: Clearly describes page content
  • Unique: Different title for each page
<title>About Us - My Company</title>
<title>Contact - My Company</title>

Include relevant keywords naturally:

<title>HTML Tutorial - Learn Web Development</title>
<!-- Homepage -->
<title>My Company - Home</title>
<!-- About Page -->
<title>About Us - My Company</title>
<!-- Blog Post -->
<title>Getting Started with HTML - My Blog</title>