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

Desktop
Explorer Edge Chrome Firefox Opera Safari
YesYes11YesYes
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
YesYes4YesYesYes

Last updated by CSSPortal on: 6th December 2019