Computer >> Computer tutorials >  >> Programming >> Javascript

How to use the <title> tag to define HTML document title?


To set the title for an HTML Document, use the HTML <title> tag. The body title is placed between the <head> and the </head> tags. HTML document title is visible on the web browsers title bar. It is considered good for SEO.

How to use the <title> tag to define HTML document title?

You can try to run the following code on a web browser to check the title of the document, which appears on the web browsers tab

Example

<!DOCTYPE html>
   <html>
      <head>
         <title>HTML Title</title>
      </head>
      <body>
         <p>This is demo text.</p>
      </body>
</html>