<!DOCTYPE html> <html> <head> <title>Document title...</title> </head> <body> <p>Page content...</p> </body> </html>
The above example demonstrates usage of the
<title> element. In this example, the title is not displayed in the preview, as it is metadata and is not displayed within the document body. Also, the preview function above is within a nested browsing context, so the title is not displayed in the browser's title bar as would normally be the case.
<title> element represents the document's title or name.
<title> element must be located inside the
<head> element. There must only be one
<title> element should contain a title that identifies the document even when it's used out of context. This is because this title can appear in many places that the author may not have expected — for example in a user's history or bookmarks, or in search results.