The Head Element


The head contains information about the document. It is normally not displayed. The elements that can occur in the HEAD are BASE, ISINDEX, MAP, META, LINK, STYLE, and SCRIPT.

TITLE

There must be exactly one TITLE element. It can contain only text, no other elements. The title is often displayed in the title bar of a window.

STYLE

The STYLE element can contain a style sheet, as described in Chapter 2, "CSS." An attribute TYPE must be added that declares the type of style language (for example, <STYLE TYPE="text/css">).

LINK

LINK specifies a relationship between the document and some other document. The relationship is a keyword that is put in the REL attribute. The URL of the other document is put in the HREF attribute. There may be zero or more LINK elements. The element has no content and the end tag must be omitted. The relation "stylesheet" is used to associate a style sheet with a document:

 <LINK REL="stylesheet"   HREF="http://example.com/sty/rf.css">

META

The META element attaches various kinds of meta-information about the document. The element has no content and the end tag must be omitted.

BASE

BASE can contain the URL of the document itself or the URL that serves as the base for relative URLs in the document. The URL is included as the value of the HREF attribute. The element has no content and the end tag must be omitted.

Here is an example of a typical HEAD:

 <HEAD>   <TITLE>The oak tree</TITLE>   <LINK REL="author" HREF="../people/Jones">   <STYLE TYPE="text/css">     H1 {font-family: Helvetica, sans-serif}     BODY {font-family: Bodoni, serif}   <STYLE> </HEAD>



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net