Sheath rule
seo-require-title
HTML documents should have a
<title> element.
#Why
The <title> is the page's name everywhere outside the page itself: the search
result, the browser tab, the bookmark, the history entry, and the first thing a
screen reader announces on load. A page without one is identified by its URL in
all of those places.
#Examples
#Bad
<!-- Missing title -->
<head>
<meta charset="utf-8">
<meta name="description" content="Page description">
</head>
<!-- Empty title -->
<head>
<title></title>
</head>
<!-- Whitespace-only title -->
<head>
<title> </title>
</head>
#Good
<!-- With descriptive title -->
<head>
<meta charset="utf-8">
<title>Getting Started with Laravel Blade - Sheath Docs</title>
</head>
<!-- Dynamic title -->
<head>
<title>{{ $post->title }} - {{ config('app.name') }}</title>
</head>
<!-- With fallback -->
<head>
<title>{{ $page->title ?? config('app.name') }}</title>
</head>
#Title Best Practices
Write a concise title that identifies the page before the site name.
| Aspect | Recommendation |
|---|---|
| Length | 50-60 characters |
| Format | Page Title - Site Name |
| Content | Descriptive, includes keywords |
| Uniqueness | Each page should have unique title |
#Title Patterns
<!-- Article pages -->
<title>{{ $article->title }} | Blog Name</title>
<!-- Product pages -->
<title>{{ $product->name }} - ${{ $product->price }} | Store</title>
<!-- Search results -->
<title>Search: {{ $query }} | Site Name</title>
<!-- Pagination -->
<title>Blog - Page {{ $page }} | Site Name</title>
<!-- Home page -->
<title>Site Name - Your Tagline Here</title>
#What Not to Do
- Too short:
"Home"- not descriptive - Too long: Gets truncated in search results
- Keyword stuffing:
"Buy Cheap Shoes Online Best Shoes Sale" - Duplicate titles: Same title on multiple pages
- Missing site name: Harder to identify in tabs
#Notes
- A title inside Blade control flow satisfies the rule only when every render path supplies one; a one-sided conditional or possibly empty loop does not.
- Every statically visible title is validated, including titles in mutually exclusive branches.
- Only documents with a
<head>element are checked - A missing title is not reported when
<head>contains dynamic content such as<x-seo>,<s:se_meta>,@include,@stack,@yield, or{!! ... !!} - The title should be placed early in the
<head> - Dynamic titles should have fallbacks for missing data
#Related Rules
- seo-meta-description - Meta description for SEO
- seo-require-open-graph - Open Graph for social sharing
- best-practices-no-duplicate-in-head - No duplicate titles