HTML <head> Tag

Description

The <head> HTML element is designed to store other elements whose purpose is to help the browser work with data. Also inside the <head> container there are meta tags that are used to store information intended for browsers and search engines. For example, search engine mechanisms use meta tags to get site descriptions, keywords, and other data.
The contents of the <head> are not displayed directly on the web page, with the exception of the <title> element, it sets the title of the web page window.

Properties

Permitted Parents
An <html> element, as its first child.
Content
<title> (required), <link>, <meta>, <style>, <script>, <base>, <object>
Start/End Tags
Start tag: optional, End tag: optional

Example

<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document goes here
</body>
</html>

Attributes

None

Global Attributes

The <head> tag also supports the Global Attributes in HTML5

Event Attributes

The <head> tag also supports the Event Attributes in HTML5

Browser Support

The following table will show you the current browser support for the HTML <head> tag.

Desktop
Edge Chrome Firefox Opera Safari
1211151
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
18414114.4

Last updated by CSSPortal on: 30th September 2023