HTML <head> (Document Head) Tag
Example
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
<h1>Heading of the document</h1>
<p>Paragraph of the document.</p>
</body>
</html>
Meaning
The <head> element specifies the document head, which contains descriptive information about the HTML document as well as other supplementary information, such as styl, meta data, links and scripts.
The <head> element contains:
<title> (required in every HTML document)<style>
<base>
<link>
<meta>
<script>
<noscript>
Version: HTML 2, 3.2, 4, 4.01, 5
Standard Syntax
<head>
<title>, <link>, <meta>, <style>, <script>, <base>
</head>
Browser Support
Status
Attributes
Attribute | Value | Description |
---|---|---|
profile | URL | Specifies the URIs of one or more metadata profiles, separated by white space |
Global Attributes
<head> element also supports the Global Attributes in HTML.
More Examples
<style> tag inside the <head> element
Example
<!DOCTYPE html>
<html>
<head>
<style>
h1 {color: red;}
p { color: tomato;}
</style>
</head>
<body>
<h1>Heading of the document</h1>
<p>Paragraph of the document.</p>
</body>
</html>
By Default CSS Value(s)
Most of the browsers will display the <head> element with the following by default value(s)
head {
display: none;
}