The <title>
element contains the document’s title that is displayed in the browser tab. Any HTML document must contain a <title>
element.
An HTML document can only contain a single <title>
element. Only text is rendered within the <title>
element.
The <title>
element must always be used within the document’s <head>
element.
Search engine algorithms use the <title>
element to decide the relevance of a document when listing pages for a search query.
To ensure that your document reaches the right audience, you must ensure that the title of your page (contained within the <title>
element) is as accurate and purposeful as possible.
You should use a descriptive phrase as your title instead of a short one or two-word title. However, search engines display about characters of the title, so you must ensure that the text within the <title>
element does not exceed that range. You should also ensure that your title is as unique as possible, as duplicate titles often lead to inaccurate search results.
The <title>
element includes only global attributes.
The code below shows how the <title>
element works in HTML:
The <title>
element in line contains the text that serves as the document’s title in browser tabs and search engines.
Free Resources