totn HTML

HTML: <head> tag

This HTML tutorial explains how to use the HTML element called the <head> tag with syntax and examples.

Description

The HTML <head> tag contains metadata and instructions for the browser that is not directly visible on the web page. This tag is also commonly referred to as the <head> element.

Syntax

In HTML, the syntax for the <head> tag is:

<head>
</head>

Attributes

In addition to the Global Attributes, the following is a list of attributes that are specific to the <head> tag:

Attribute Description HTML Compatibility
profile URIs of metadata profiles HTML 4, Obsolete in HTML5

Note

Browser Compatibility

The <head> tag has basic support with the following browsers:

  • Chrome
  • Android
  • Firefox (Gecko)
  • Firefox Mobile (Gecko)
  • Internet Explorer (IE)
  • Edge Mobile
  • Opera
  • Opera Mobile
  • Safari (WebKit)
  • Safari Mobile

Example

We will discuss the <head> tag below, exploring examples of how to use the <head> tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.