English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
HTML <head> tag contains browser metadata and descriptions that are not directly visible on the web page. This tag is also commonly known as the <head> element.
A HTML document with a <title> tag in the head:
!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>Basic Tutorial(oldtoolbag.com)</title> </head> <body> <h1>My first web heading</h1> <p>My first web paragraph.</p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the <head> tag.
The <head> element is the container for all head elements.
The <head> element must contain the document's title (title), and can include scripts, styles, meta information, and other additional information.
The following elements can be used inside the <head> element:
HTML5 The profile attribute is no longer supported.
Attribute | Value | Description |
---|---|---|
profile | URL | HTML5 Not supported. A series of rules to define the document URL. These rules can be recognized by the browser and accurately read the information in the content attributes of the <meta> tag. |
The <head> tag supports HTML Global Attributes.
Using the <base> tag in <head>
This example demonstrates how to use the <base> tag to specify the default URL and default target for all links in the page.
Using the <style> tag in <head>
This example demonstrates how to add style information in the <head> section.
Using the <link> tag in <head>
This example demonstrates how to use the <link> tag to link to an external stylesheet.
HTML Tutorial:HTML Header