Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

HTML 4.0 Sourcebook
(Publisher: John Wiley & Sons, Inc.)
Author(s): Ian S. Graham
ISBN: 0471257249
Publication Date: 04/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


In general, REL defines the relationship of the targeted document to the current document. For example, REL=“next” would indicate that the targeted document is the next document after the current one. REV defines the relationship of the current document relative to the target document, which is often just the converse of REL. Thus, REV=“next” would indicate that the current document is the “next” document following the targeted one. In fact, REL and REV are not always the converse of one another—for example, REL=“image” indicates that the targeted resource is an image file, but the converse REV=“image” is not possible, since the current document is by definintion an HTML document and not an image.

The following are some commonly used LINK elements:

<LINK REL=“made” HREF=“mailto:igraham@utoronto.ca”>
HREF points to information about the creator of the document containing the LINK.
<LINK REL=“stylesheet” HREF=“./styles/stylesheet.css”>
HREF points to a document containing a style sheet. The style sheet should be retrieved and applied to the document being rendered. This use of LINK is understood by Internet Explorer 4 and Netscape Navigator 4.
<LINK REL=“fontdef” HREF=“/url/to/filenam.pfr”>
HREF points to a document containing a Bitstream TrueDoc-format Portable Font Resource (PFR) file. This is a downloadable font that can be used within the document. This font format (and this LINK mechanism) are only supported by Netscape Navigator 4.
<LINK REL=“begin” HREF=“/usr/to/begin/file.html”>
HREF points to a document that is at the “beginning” of the collection containing the current document. This is often used by Web indexing tools, to help determine the structure of a Web site, and a collection’s preferred home page.
<LINK REL=“alternate” LANG=“fr” HREF=“file-fr.html”>
HREF points to an alternative version of the current document. Here, the LANG attribute indicates that the alternate document is in French. Alternately, the TYPE attribute could indicate that the linked resource is an alternative document, in a different format.

In addition to HREF, REL, and REV, LINK also takes the “generic” and “event-handling” attributes noted earlier in this chapter. Notably, ID can be used to create indirected links: An ID-labeled LINK element can, in principle, be referenced by a hypertext anchor referencing the ID value. Thus this anchor references the LINKed resource indirectly, via the element’s ID. This behavior is not supported by current browsers.

LINK also supports several other newer (currently unsupported) attributes. These are:

CHARSET=“string” (optional; not currently supported) Specifies the character set used by the linked resource. Character set specifications are described in Appendix A found on the companion Web site. This attribute is not understood by current browsers.
HREFLANG=“lang-code” (optional; not currently supported) Specifies the language of the resource specified by the HREF attribute. Language codes are described in Appendix E on the companion Web site. This attribute is not understood by current browsers.
MEDIA=“comma-separated-strings” (optional; not currently supported) If the referenced resource is a style sheet, the MEDIA attribute can specify the presentation media for which the style sheet should be used. Some possible values are “screen” (for a computer display), “print,” “projection” (for projection displays), “Braille” (for Braille readers), or “aural” (for text-to-speech synthesizers). This attribute is not understood by current browsers.
TARGET=“string” (optional; not currently supported) Specifies the name of the target frame or window to which the LINKed resource should be sent, upon retrieval. This attribute is not understood by current browsers.
TYPE=“mime-type” (optional; not currently supported) If the referenced resource is a style sheet, the TYPE attribute defines the MIME type for the style sheet: for example, text/css for cascading style sheets. This attribute is not understood by current browsers.

LINK elements, with REL (or REV) attributes, are only useful given well-understood meanings for the values assigned to them. The process of defining a set of values is currently underway: Some of the commonly understood relationships are given in the examples below. In the absence of well-defined meanings, LINK is largely unused. The document

www.utoronto.ca/ian/books/html4ed/chap6/relrev.html

at the book’s supporting Web site describes some efforts at establishing well-accepted values.

META Element: Document Meta-information

Usage: <META>
Can Contain: empty
Can Be Inside: HEAD
Attributes: DIR, LANG,
CONTENT, HTTP-EQUIV, NAME, SCHEME

The META element provides a place to put meta-information about a document that does not fit inside other HEAD elements. This lets an author more richly describe the document content for indexing, parsing, or cataloging purposes, as illustrated in the following discussion.

The META element is optional. If present, it must take the CONTENT attribute and one of the NAME or HTTP-EQUIV attributes (but not both). The meanings of the attributes are:

NAME=“name” (one of NAME or HTTP-EQUIV must be present) This specifies the meta-information name (ideally as a name token). The client program (browser) must understand what this name means. HTML does not currently define any values for NAME. META must contain one of NAME or HTTP-EQUIV, but not both.
HTTP-EQUIV=“name” (one of NAME or HTTP-EQUIV must be present) This indicates meta-information equivalent to that communicated by the HTTP protocol within HTTP response header fields. HTTP response headers are discussed in Chapter 9. META must contain either 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.
SCHEME=“string” (optional; not currently supported) This attribute names the scheme used to determine the appropriate value, given the indicated NAMEd property: Thus, this is valid only when NAME is used. This provides additional information for identifying the meanings associated with the NAME and CONTENT values. For example, the attributes NAME=“description” and CONTENT=“c32e1: Biological Surveys” are not terribly meaningful, but the added attribute SCHEME=“HumanGenomeProject-Index” indicates that the format for the description is specified by the indicated indexing scheme. There is, unfortunately, no current software that processes this information.

NAME Attribute Usage

An example using the NAME attribute is:

<META NAME=“keywords” CONTENT=“pets dogs cats rocks lizards”>

This tells the client that the words “pets,” “dogs,” “cats,” “rocks,” and “lizards” are keywords useful for indexing the current document. The client or indexing program that is accessing the HEAD of this document must consequently understand the meanings behind the names.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.