HTML <head> Tag

Description:

The <head> tag is used for indicating the head section of the HTML document.

The head can contain other HTML tags that provide information about the document such as title, description, keywords etc. Most of this information is not displayed in the browser but can be useful for search engines etc. The head tag is placed between the <html> and the <body> tags.

 

Specific Attributes:

Attribute Definition
profile Specifies the URI/URL of one or more meta data profiles.

Other Attributes:

Attribute Definition
lang Specifies a language code for the content in an element.
dir

Specifies the text direction for the content in an element.
Possible Values:

  • rtl  (Right to Left)
  • ltr  (Left to Right)

Example Code:

<html>
<head>
<title>Title of the document</title>
</head>

<body>
The content of the document......
</body>

</html>