DOM Document.title Property
The title property gets or sets the page title shown in the browser tab.
Description
The title property gets or sets the document's title, shown in the browser tab, history and bookmarks. Single-page applications should update it whenever the view changes, so the tab and screen readers reflect the current page. Some sites also add an unread count, like "(3) Inbox".
The value is the text content of the first <title> element, with white space collapsed. If the page has no <title>, setting document.title creates one in the head.
Search engines generally use the title from the initial HTML, so set meaningful titles on the server where you can. For notifications, changing the title briefly, such as "(1) New message", draws attention to a background tab without being intrusive.
Syntax
document.title
document.title = textValue
A string: the text of the document's <title>.
Example
Browser Support
The following information will show you the current browser support for the Document.title property. Hover over a browser icon to see the version that first introduced support for this property.
Desktop





Tablets & Mobile





