HTML QUICK REFERENCE
The HyperText Markup Language (HTML) is composed of a set of elements
that define a document and guide its display. This document presents a
concise reference guide to HTML, listing the most commonly used
elements from Versions 1 and 2 of HTML, and giving a brief description
of those elements.
Users should be aware that HTML is an evolving language, and different
World-Wide Web browsers may recognize slightly different sets of HTML
elements. For general information about HTML including plans for new
versions, see http://www.w3.org/hypertext/WWW/MarkUp/MarkUp.html. For
a comprehensive list of HTML elements see
http://www.sandia.gov/sci_compute/html_ref.html
An HTML element may include a name, some attributes and some text or
hypertext, and will appear in an HTML document as
text text , or just
For example:
My Useful Document
and
text
An HTML document is composed of a single element:
. . .
that is, in turn, composed of head and body elements:
. . .
and
. . .
To allow older HTML documents to remain readable, , , and
are actually optional within HTML documents.
Elements usually placed in the head element
Specifies that the current document describes a database that
can be searched using the index search method appropriate for
whatever client is being used to read the document. For
example, a Lynx user will use the "s" keyboard command.
. . .
Specify a document title. Note that the title will not appear
on the document as is customary on printed documents. It will
usually appear in a window bar identifying the contents of the
window. HTML header tags perform the functions usually reserved
for titles.
Specify the name of the file in which the current document is
stored. This is useful when link references within the document
do not include full pathnames (i.e., are partially qualified).
The link tag allows you to define relationships between the
document containing the link tag and the document specified in
the "URL". The rel attribute specifies the relationship between
the HTML file and the Uniform Resource Locator (URL). The rev
attribute (for "reverse") specifies the relationship between
the URL and the HTML file. For example, indicates that the file maker or owner is described
in the document identified by the URL. (Note that link tags are
not displayed on the screen as part of the document. They
define static relationships, not hypertext links.)
Elements usually placed in the body element
The following sections describe elements that can be used in the body
of the document.
Text Elements
The end of a paragraph that will be formatted before it is
displayed on the screen.
. . .
Identifies text that has already been formatted (preformatted)
by some other system and must be displayed as is. Preformatted
text may include embedded tags, but not all tag types are
permitted. The
tag can be used to include tables in
documents.
. . .
Example computer listing; embedded tags will be ignored, but
embedded tabs will work. This is an archaic tag.
. . .
Similar to
except no embedded tags will be recognized.
Similar to
except no embedded tags will be recognized,
and since there is no end tag, the remainder of the document
will be rendered as plain text. This is an archaic tag. Note
that some browsers actually recognize a
tag, even
though it is not defined by the standard.
. . .
Include a section of text quoted from some other source.
Hyperlinks or Anchors
. . .
Define a target location in a document
. . .
Link to a location in the same document
. . .
Link to another file or resource
. . .
Link to a target location in another document
. . .
Send a search string to a server. Different servers may
interpret the search string differently. In the case of
word-oriented search engines, multiple search words might be
specified by separating individual words with a plus sign (+).
An anchor must include a name or href attribute, and may include both.
There are several optional attributes, but they are rarely
encountered.
The structure of a Uniform Resource Locator (URL) may be expressed as:
resource_type:additional_information
where the possible resource types include: file, http, news, gopher,
telnet, ftp, and wais, among others, and each resource type relates to
a specific server type. Since each server performs a unique function,
each resource type requires different additional_information. For
example http and gopher URLs will have a structure like:
resource_type://host.domain:port/pathname
The colon followed by an integer TCP port number is optional, and is
used when a server is listening on a non-standard port.
Strictly speaking, the anchor_name and search_word information
included in the name and href attributes in the examples above are
part of the URL. They are presented as separate entities for
simplicity. A more complete description of URLs is presented in
http://www.w3.org/hypertext/WWW/Addressing/Addressing.html
Headers
. . .
Most prominent header
. . .
. . .
. . .
. . .
. . .
Least prominent header
Logical Styles
. . .
Emphasis
. . .
Stronger emphasis
. . .
Display an HTML directive
. . .
Include sample output
. . .
Display a keyboard key
. . .
Define a variable
. . .
Display a definition (not widely supported)
. . .
Display a citation
Physical Styles
. . .
Boldface
. . .
Italics
. . .
Underline
. . .
Typewriter font
Definition list/glossary:
First term to be defined
Definition of first term
Next term to be defined
Next definition
The
attribute compact can be used to generate a definition list
requiring less space.
Present an unordered list: