head

FilterElements

<head> ... </head>

Defines the head portion of the document that contains information about the document. Every head element must include a title element that provides a description of the document. The head element may also include any of these elements in any order: base, link, meta, noscript, script, style, object (HTML 4.01 only), and command (HTML5 only). The head element merely acts as a container of these elements and does not have any content of its own.

Start/End Tags

HTML: Optional/Optional;
XHTML: Required/Required

Specifications

  • HTML 4.01
  • HTML5

id=

Values: text
XHTML and HTML5 only. Assigns a unique identifying name to the element.

profile=

Values: URLs
Not in HTML5. Provides the location of one or more predefined metadata profiles separated by whitespace that are used to define properties and values that can be referenced by meta elements in the head of the document, rel and rev attributes, and class names. This attribute is not well supported.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/HTML4.01/strict.dtd">
<html>
  <head>
    <title>Document Title</title>
    <style type="text/css">h1 {color: #333;}</style>
  </head>
  <body>
    <p>Content of document . . . </p>
  </body>
</html>

Rendered Example

head contains information about the document and does not render.