HTML title Tag

The <title> tag in HTML is used to define the title of an HTML document. The title appears in the browser tab or window and is also used by search engines to identify the content of the page.

The <title> the tag should be placed in the <head> element of the HTML document, and should only contain text (no other HTML elements). Here is an example of an HTML document with an <title> element:

<!DOCTYPE html>
<html>
  <head>
    <title>My Page</title>
  </head>
  <body>
    <h1>Welcome to My Page</h1>
    <p>Here is some information about me:</p>
    <ul>
      <li>Name: John</li>
      <li>Age: 30</li>
      <li>Location: New York</li>
    </ul>
  </body>
</html>

In this example, the title of the HTML document is “My Page”. This title will appear in the browser tab or window and will be used by search engines to identify the content of the page.

It’s important to choose a descriptive and relevant title for your HTML documents, as this will help users and search engines understand the content of the page. The title should be concise and to the point, and should accurately reflect the content of the page.

That’s it! You now know how to use the HTML <title> tag to define the title of an HTML document.

Leave a Reply