HOME
NEXT
PREV
HTML HEAD Summary
HOME
MAIN
NEXT
HEAD Element: Document Meta-Information
Usage:
<HEAD>...</HEAD>
Can Contain: BASE, ISINDEX, LINK, META,
SCRIPT, STYLE, TITLE
Can Be Inside: HTML
Attributes: HREF
HEAD contains general information about the document. This information is
not displayed as part of the document text. The only mandatory HEAD
element is TITLE; all others are optional. Since the HEAD is
always much smaller than the body, this is faster than accessing an entire
document, and can be extremely useful for quickly generating catalogs or indexes
based on HEAD content.
Example:
<HEAD>
<TITLE>HTML
Summary</TITLE>
</HEAD>
HOME
MAIN
NEXT
PREV
BASE Element: Base URL
Usage:
<BASE>
Can Contain: empty
Can Be Inside: HEAD
Attributes: HREF,
TARGET
BASE has a single mandatory attribute, HREF,
which is assigned the base URL of the document.
- Attributes
- HREF="base_url" Specifies the base URL of the document. The base URL is a URL
indicating where a document was originally located. This is useful for documents
moved away from their original URL--after moving the document, partial URLs that
referenced neighboring documents are no longer valid. However, if the original
URL address is specified in the BASE element, then relative URLs from this
document are evaluated relative to this "base" URL and are correctly
located from the original location.
- TARGET="target_window_name" (Netscape
Frame)
Example:
<HEAD>
<BASE HREF="http://www.html.com/basehtml.html">
</HEAD>
HOME
MAIN
NEXT
PREV
ISINDEX Element: Searchable Document
Usage:
<ISINDEX>
Can Contain: empty
Can Be Inside: HEAD [BLOCKQUOTE, BODY, CENTER, DD,
DIV, FORM, LI, TD, TH]
Attributes: PROMPT,
ACTIONISINDEX informs the browser that the document can be
examined using a keyword search, and that the browser should query the user for
a search or query string. ISINDEX should be inside the HEAD only,
not in the BODY.
- Attributes
- PROMPT specifies the prompt that should be presented for this
query.
- ACTION="url"
TOP
- Example 1: ISINDEX element.
File IsindexEx1.htm
<HTML>
<HEAD>
<TITLE>HTML ISINDEX Element Example 1</TITLE>
<ISINDEX>
</HEAD>
<BODY>
<H1>HTML ISINDEX Element Example 1</H1>
<P>Enter your search in the search field</P>
</BODY>
</HTML>
- Example 1 Output: Click here
to go to IsindexEx1.htm.
TOP
- Example 2: ISINDEX element with PROMPT
ACTION.
File IsindexEx2.htm
<HTML>
<HEAD>
<TITLE>HTML ISINDEX Element Example 2</TITLE>
<ISINDEX PROMPT="Enter your search in the search
field" ACTION="IsindexEx2A.htm">
</HEAD>
<BODY>
<H1>HTML ISINDEX Element Example 2</H1>
<P>Enter your search in the search field</P>
</BODY>
</HTML>
- Example 2 Output: Click here
to go to IsindexEx2.htm.
HOME
MAIN
NEXT
PREV
LINK Element: Relationship to Other Documents
Usage:
<LINK>
Can Contain: empty
Can Be Inside: HEAD
Attributes: HREF,
ID, REL, REV, TITLELINK describes a relationship between a
document and other documents or objects. For example, LINK can indicate a
related index, a glossary, or perhaps different versions of the same document.
Alternately, LINK can point to next or previous documents. This
information could be used by a browser--for instance, to predict and preload
documents it is likely to need, or to configure customized navigational buttons
or menus. A document can have any number of LINK elements to represent
these various relationships to other documents. The HREF attribute is
mandatory, as is at least one of REL or REV.
- Attributes are similar to the anchor
(A) element, except ID.
- ID labels a LINK with an identifying label, which must
be a name token. Using ID, LINK elements can themselves be
referenced by a hypertext anchor, allowing for a level of indirection in
link references.
- REL/REV see http://www.sg.com/papers/Relatioship.com
Example:
<HEAD>
<LINK REL="made"
HREF="mailto:igraham.utoronto.ca">
<LINK REL="next"
HREF="next_document_url">
<LINK REL="previous"
HREF="previous_document_url">
<LINK REL="index"
HREF="index_document_url">
<LINK REL="toc"
HREF="table_of_content_document_url">
</HEAD>
HOME
MAIN
NEXT
PREV
META Element: Document Meta-Information
Usage:
<META>
Can Contain: empty
Can Be Inside: HEAD
Attributes: CONTENT,
HTTP-EQUIV, NAMEMETA provides a place to put meta-information that
is not defined by the other HEAD elements. This allows an author to more
richly describe the document content for indexing and cataloging purposes. CONTENT
attribute is mandatory and one of the NAME or HTTP-EQUIV
attributes (but not both).
- Attributes:
- NAME="name" Specifies the meta-information
name (name token). The client program (browser) must understand what
this name means. HTML does not currently define any values for NAME.
META must content one of NAME or HTTP-EQUIV, but
not both.
- HTTP-EQUIV="name" Specifies the
meta-information equivalent to that communicated by the HTTP protocol
within HTTP response header fields. META must content one of NAME
or HTTP-EQUIV, but not both.
- CONTENT="string" (Mandatory) This assigns the
content associated with the NAME or HTTP-EQUIV value of
the META element.
Example:
<HEAD>
<META NAME="keywords"
CONTENT="pets dogs cats rocks lizards">
</HEAD>
The client or indexing program that is accessing the HEAD of this document
must consequently understand the meanings behind the names.
HOME
MAIN
NEXT
PREV
SCRIPT Element: Include a Program Script
Usage:
<SCRIPT>...</SCRIPT>
Can Contain: script program code (characters)
Can Be Inside: HEAD, BODY, any BODY element that
allows content
Attributes: LANGUAGE,
SRC, TYPESCRIPT is used to include program scripts within an HTML
document. The content of the element is treated as script program code, and is
executed, if possible, by the browser. Browsers that do not understand SCRIPT
elements or the language in which the script is written should ignore this
element and its content.
- Attributes:
- LANGUAGE="string" (optional) (Netscape Navigator and
Internet Explorer only) Specifies the language of the script contained
within the SCRIPT element. The only commonly supported values are
LANGUAGE="JavaScript", for JavaScript and LANGUAGE="VBScript"
for Visual Basic Script. Internet Explorer supports both languages.
Netscape Navigator 3 supports only JavaScript.
- SRC="url" (optional) (Netscape Navigator only)
Specifies the URL of a file that contains a script.
- TYPE="string" (Not yet supported) Gives the
MIME type for the script referenced by the SRC attribute.
Example:
<SCRIPT SRC="http://scripts.ian.com/prog1.js"
TYPE="application/x-javascript"></SCRIPT>
HOME
MAIN
NEXT
PREV
STYLE Element: Stylesheet or Rendering Information
Usage:
<STYLE>...</STYLE>
Can Contain: characters
Can Be Inside: HEAD
Attributes: noneSTYLE
contains stylesheet rendering instructions, to be applied to the document when
displayed by the browser. STYLE allows rendering information to be placed
within the document, and not as a second file referenced through a LINK element.
Example:
<HEAD>
<STYLE>
BODY {
background: url (wave.gif) black;
}
H1 {
margin-top: 10px;
color: #4P;
text-align: left;
font: 30px "Arial Alternative", gill, helvetica, snas-serif;
}
...
</STYLE>
</HEAD>
HOME
MAIN
PREV
TITLE Element: Document Title
Usage:
<TITLE>...</TITLE>
Can Contain: characters
Can Be Inside: HEAD
Attributes: noneTITLE
contains the title of a document. Every document must have a TITLE, and can only
have one.
Example:
<HEAD>
<TITLE>HTML
Summary</TITLE>
</HEAD>