HTML title Tag

HTML title Tag

HTML <title> Tag


The <title> tag defines a title of an HTML document. The title is displayed in the browser toolbar and on search engine results pages (SERPs) as the clickable headline.
The title should contain keywords so that search engines rank the page for relevant queries.
There should be only one one <title> element in an HTML document located inside <head> section.

Syntax

The <title> element comes in pairs, the content must be written between opening (<title>) and closing (</title>) elements.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>W3Docs - learn HTML, CSS, PHP, JavaScript online.</title>
  </head>
  <body>
    <p>The main content of the page.</p>
  </body>
</html>

Result

title example

Attributes

The <title> tag supports the Global Attributes.
Reactions

Post a Comment

0 Comments

close