HTML5 <title> Tag

The HTML <title> element is used to define the title of the document, shown in a browser’s title bar or on the page’s tab. It can only contain text, and any contained tags are ignored.

The only content permitted inside this element is text that is not inter-element whitespace. This element requires both opening and closing tags. Note that leaving off </title> should cause the browser to ignore the rest of the page

The parent of the <title> tag can only be a <head> element that contains no other <title> element.

The following style is applied to this element by default:

title {
  display: none;

You should note how the title describes the subject matter unambiguously, while the first heading assumes the reader knows what the context is.

Here are some examples of using this tag:

<title>Introduction to The Mating Rituals of Bees</title>
<p>This companion guide to the highly successful
<cite>Introduction to Medieval Bee-Keeping</cite> book is...


This element only accepts global attributes.

Further Reading

  1. Read more about the HTML <title> element on MDN.
  2. You can also read the HTML <title> tag reference on W3C.

Reader Comments

1. You can register or login to post a comment. Asking readers to register improves the quality of discussion.

2. As a registered user, you will also get to access features like choosing between a light and dark theme or anything else that we might implement in future.

Follow Us For Updates

Go To Top