Document content......"> Document Title Document content......" />
Easy Tutorial
❮ Att A Charset Att Textarea Autofocus ❯

HTML <head> Tag

Example

An HTML document with a <title> tag in the head:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Document Title</title>
</head>

<body>
Document content......
</body>

</html>

Browser Support

All major browsers support the <head> tag.


Tag Definition and Usage

The <head> element is a container for all head elements.

The <head> element must contain the document's title (title), and can contain scripts, styles, meta information, and more.

The following elements can be used inside the <head> element:


Differences Between HTML 4.01 and HTML5

HTML5 no longer supports the profile attribute.


Attributes

Attribute Value Description
profile URL Not supported in HTML5. Specifies a list of rules for the document URL. These rules can be recognized by the browser and used to accurately read information in the content attribute of the <meta> tag.

Global Attributes

The <head> tag supports HTML's global attributes.


Try It - Examples

Using the <base> tag in <head>

Using the <style> tag in <head>

Using the <link> tag in <head>


Related Articles

HTML Tutorial: HTML Head

❮ Att A Charset Att Textarea Autofocus ❯