Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

<head></head>

By Jennifer Kyrnin, About.com

<head> Description:

The <head></head> element defines information about the HTML document, including: styles, javascripts, the title, and meta information.

<head> Web Browser Support:

<head> Attributes:

<head> End Tag:

</head> REQUIRED

<head> Contents:

Title tag, meta data tags, scripts, and CSS tags. The following tags are valid within the <head> tag:
base, isindex, link, meta, script, style, title

<head> Valid Context:

The <head> tag is valid within the following tags:
html

<head> Usage:

  • Minimal <head>
    <head>
    <title>A Descriptive Title</title>
    </head>
  • <head> including style information
    <head>
    <title>title</title>
    <style>
    <!--
    p { color: #009900; }
    -->
    </style>
    </head>
  • Meta tags in the <head>
    <head>
    <title>title</title>
    <meta http-equiv="refresh" content="10;URL=http://webdesign.about.com/">
    </head>

<head> Special Notes:

  • While the head section is not technically required in XHTML, it is a good idea to include it both for your <title> tag and to avoid confusing older browsers.
  • Always include a title, it's good style and the title displays in the browser window pane and in search engine results.

More <head> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML

About.com Special Features

Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.