04. title Tag
Introduction
Section titled “Introduction”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.
Basic Usage
Section titled “Basic Usage”<head> <title>My Web Page</title></head>Where Title Appears
Section titled “Where Title Appears”Browser Tab
Section titled “Browser Tab”The title appears in the browser tab:
[Tab Icon] My Web PageBookmarks
Section titled “Bookmarks”When users bookmark a page, the title is used:
Bookmarks └─ My Web PageSearch Results
Section titled “Search Results”Search engines display the title in results:
My Web Pagehttps://example.comDescription of the page...Browser History
Section titled “Browser History”Titles appear in browser history.
Best Practices
Section titled “Best Practices”Keep It Concise
Section titled “Keep It Concise”- 50-60 characters: Optimal length for search results
- Descriptive: Clearly describes page content
- Unique: Different title for each page
Include Site Name
Section titled “Include Site Name”<title>About Us - My Company</title><title>Contact - My Company</title>Use Keywords
Section titled “Use Keywords”Include relevant keywords naturally:
<title>HTML Tutorial - Learn Web Development</title>Examples
Section titled “Examples”<!-- Homepage --><title>My Company - Home</title>
<!-- About Page --><title>About Us - My Company</title>
<!-- Blog Post --><title>Getting Started with HTML - My Blog</title>