Contains header information about the HTML document. | HTML 2, 3.2, 4, 4.01, 5 |
HTML Syntax
<head>
<base>
<basefont>
<link>
<meta>
<script>
<style>
<title>
</head>
The <head
> element’s start tag can be omitted if the element is empty, or if the first thing inside the <head
> element is an element.
The <head
> element”s end tag can be omitted if the <head
> element is not immediately followed by whitespace or a comment.
The head element defines an HTML document header, that contains information about the document that is of use to the Web browser and search indexing engines.
The browser displays none of the information in the header, except for text contained in the <title> element.
All header information must be between the <head> and </head> tags, which should precede the <body> element.
The head element can contain the following elements:
The <head>
element has no attribute of its own, but supports global attributes common to all HTML elements.
The following example shows how the <head
> element may be used.
<html>
<head>
<title>Sample HTML document</title>
</head>
<body>
<p>Hello, World.</p>
</body>
</html>
Show me
The following example shows the information found in this document’s head element.
<html>
<head>
<title>HTML Elements Reference: HEAD Element</title>
<meta name="description" content="Abakada, a workshop on Web site design and development.
Step-by-step how-to pages help you learn skills and do specific tasks as you plan, build and manage your Web site,
from start to finish." />
<meta name="keywords" content="HTML, CSS, JavaScript, DHTML, web design, web development" />
<meta name="author" content="Reynald Nuñez" />
...
</head>
HTML META TITLE BODY