<head>

The <head> tag represents a collection of metadata related to the current document. It is an immediate child of the <html> element and may include other tags such as <title>, <link>, <style>, and <script>.

Syntax

Loading...

<head> is a tag whose content does not get shown to the user, so there is no default formatting behavior.

Example

Suppose that the site needs a title shown in the browser, either in the tab or in the browser window. Additionally it needs to load some CSS rules to style the document, and a JavaScript script to allow some interactivity.

The <head> tag is the perfect place to tell the document where these things live, and what they should be:

Loading...
Interested in helping build Docs? Read the Contribution Guide or share your feedback.

Learn HTML on Codecademy