Skip to main content
HTML Validation

Element “title” must not be empty.

About This HTML Issue

The HTML specification requires every document to have a <title> element with at least one non-whitespace character. The title serves as the primary label for the page — it appears in the browser tab, in bookmarks, in search engine results, and is announced by screen readers when a user navigates to the page. An empty title leaves users with no way to identify or distinguish the page, which is especially problematic for accessibility. Screen reader users rely on the document title to understand what page they’ve landed on, and an empty title provides no context at all.

Browsers may attempt to display something (such as the URL) when the title is missing or empty, but this fallback is inconsistent and often produces a poor user experience. Search engines also depend on the <title> element for indexing and displaying results, so an empty title can negatively affect discoverability.

This error commonly occurs when templates or boilerplate code include a <title> tag as a placeholder that never gets filled in, or when content management systems fail to inject a title value into the template.

How to fix it

Add descriptive, concise text inside the <title> element that accurately reflects the content of the page. A good title is typically 20–70 characters long and specific enough to distinguish the page from other pages on the same site.

  • Every page should have a unique title relevant to its content.
  • Avoid generic titles like “Untitled” or “Page” — be specific.
  • For multi-page sites, consider a format like “Page Name - Site Name”.

Examples

❌ Empty title element

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <p>Welcome to our website.</p>
  </body>
</html>

This triggers the error because the <title> element contains no text.

❌ Title with only whitespace

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>   </title>
  </head>
  <body>
    <p>Welcome to our website.</p>
  </body>
</html>

This also triggers the error. Whitespace-only content is treated as empty.

✅ Title with descriptive text

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Getting Started - Automated Website Validator</title>
  </head>
  <body>
    <p>Welcome to our website.</p>
  </body>
</html>

The <title> element now contains meaningful text that identifies both the page and the site, making it accessible, SEO-friendly, and standards-compliant.

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?

Ready to validate your sites?
Start your free trial today.