Introduction
In HTML, the <title>
element is used to define the title of a document, such as a webpage. It is placed inside the <head>
element of an HTML document . The text specified within the <title>
element appears in the browser’s title bar or tab, and it is also used as the default name when users bookmark the page.
Here’s a basic example of how the <title>
element is used:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello World</title>
</head>
<body>
<!-- Content of the webpage goes here -->
</body>
</html>
Ouptut :
In this example, the text “Hello World” specified within the <title>
element will be displayed in the browser’s title bar or tab when this HTML document is loaded.
We can change the name of the document according to ourself.