HTML 3.0 28th March 1995
INTERNET DRAFT Dave Raggett, W3C
Expires in six months email: <dsr@w3.org>
HyperText Markup Language Specification Version 3.0
<draft-ietf-html-specv3-00.txt>
Status of this Memo
This document is an Internet draft. Internet drafts are working
documents of the Internet Engineering Task Force (IETF), its areas
and its working groups. Note that other groups may also distribute
working information as Internet drafts.
Internet Drafts are draft documents valid for a maximum of six
months and can be updated, replaced or obsoleted by other documents
at any time. It is inappropriate to use Internet drafts as reference
material or to cite them as other than as "work in progress".
To learn the current status of any Internet draft please check the
"lid-abstracts.txt" listing contained in the Internet drafts shadow
directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
munnari.oz.au (Pacific Rim), ds.internic.net (US East coast) or
ftp.isi.edu (US West coast). Further information about the IETF can
be found at URL: http://www.cnri.reston.va.us/
Distribution of this document is unlimited. Please send comments to
the HTML working group (HTML-WG) of the Internet Engineering Task
Force (IETF) at <html-wg@wg.oclc.org>. Discussions of this group are
archived at URL: http://www.acl.lanl.gov/HTML-WG/archives.html.
Abstract
The HyperText Markup Language (HTML) is a simple markup language
used to create hypertext documents that are portable from one
platform to another. HTML documents are SGML documents with generic
semantics that are appropriate for representing information from a
wide range of applications. HTML markup can represent hypertext
news, mail, documentation, and hypermedia; menus of options;
database query results; simple structured documents with inlined
graphics and hypertext views of existing bodies of information.
This specification defines the capabilities of HTML version 3.0 and
provides additional capabilities over previous versions such as
tables, text flow around figures and math. It is backwards
compatible with HTML 2.0.
[Link to Table of Contents]--
Dave Raggett Page 1
HTML 3.0 28th March 1995
Table of Contents
1. Introduction ...................................................... 4
a) How to participate in refining HTML 3.0 ....................... 4
b) HTML 3.0 Overview ............................................. 4
c) Transition strategy from HTML 2.0 ............................. 5
d) Design Guidelines for HTML 3.0 ................................ 6
2. Understanding HTML and MIME ....................................... 9
3. Understanding HTML and SGML ...................................... 10
4. The Structure of HTML 3.0 Documents .............................. 15
5. The HEAD Element and Related Elements ............................ 17
6. The BODY Elements ................................................ 24
a) Banners ...................................................... 26
b) Divisions .................................................... 27
c) Heading Elements ............................................. 29
d) Paragraphs ................................................... 33
e) Line Breaks .................................................. 36
f) Horizontal Tabs .............................................. 38
g) Hypertext Links .............................................. 40
h) Overview of Character-Level Elements ......................... 44
- Information Type Elements ................................ 46
- Font Style Elements ...................................... 48
i) The IMG (Image) Element ...................................... 50
j) Unordered Lists .............................................. 53
k) Ordered Lists ................................................ 59
l) Definition Lists ............................................. 62
m) Figures ...................................................... 69
n) Tables ....................................................... 77
Dave Raggett Page 2
HTML 3.0 28th March 1995
o) Math -- missing entity names -- .............................. 92
p) Horizontal Rules ............................................ 111
q) Preformatted Text ........................................... 113
r) Admonishments ............................................... 116
s) Footnotes ................................................... 118
t) Block Quotes ................................................ 120
u) The ADDRESS Element ......................................... 122
v) Fill-out Forms .............................................. 124
7. Special Characters .............................................. 142
8. Security Considerations ......................................... 145
9. HTML 3.0 Document Type Definition
a) The SGML Declaration ........................................ 146
b) The Latin-1 Character Entities -- needs work ................ 148
c) Math and Greek Entities -- under construction ............... 154
d) HTML Icon Entities .......................................... 156
e) The HTML 3.0 DTD ............................................ 157
10. Terms -- needs work ............................................. 185
11. References -- needs work ........................................ 188
12. Acknowledgements -- needs work .................................. 189
Dave Raggett Page 3
HTML 3.0 28th March 1995
Introduction to HTML 3.0
HyperText Markup Language (HTML) is a simple markup system used to
create hypertext documents that are portable from one platform to
another. HTML documents are SGML documents with generic semantics
that are appropriate for representing information from a wide range
of applications. HTML markup can represent hypertext news, mail,
documentation, and hypermedia; menus of options; database query
results; simple structured documents with in-lined graphics; and
hypertext views of existing bodies of information.
HTML has been in use by the World-Wide Web (WWW) global information
initiative since 1990. The HTML 3.0 specification provides a number
of new features, and is broadly backwards compatible with HTML 2.0.
It is defined as an application of International Standard ISO
ISO8879:1986 Standard Generalized Markup Language (SGML). This
specificiation will be proposed as the Internet Media Type (RFC
1590) and MIME Content Type (RFC 1521) called "text/html;
version=3.0".
How to participate in refining HTML 3.0
The process of refining HTML 3.0 into a formal standard will be
carried out by the IETF HTML working group. The World Wide Web
Organization is continuing to develop a freeware testbed browser for
HTML 3.0 ("Arena") to encourage people to try out the proposed
features. The discussion list for HTML 3.0 is www-html with html-wg
reserved for use by the IETF working group for detailed matters
relating to the formal specification. The process for developing
HTML 3.0 is open, and anyone who is interested and able to
contribute to this effort is welcome to join in.
--Note: make mailing list names into hypertext links to their
archives and add info on how to join these lists--
HTML 3.0 Overview
HTML 3.0 builds upon HTML 2.0 and provides full backwards
compatibility. Tables have been one of the most requested features,
with text flow around figures and math as runners up. Traditional
SGML table models, e.g. the CALS table model, are really complex.
The HTML 3.0 proposal for tables uses a lightweight style of markup
suitable for rendering on a very wide range of output devices,
including braille and speech synthesizers.
HTML 3.0 introduces a new element: FIG for inline figures. This
provides for client-side handling of hotzones while cleanly catering
for non-graphical browsers. Text can be flowed around figures and
you can control when to break the flow to begin a new element.
Including support for equations and formulae in HTML 3.0 adds
relatively little complexity to a browser. The proposed format is
strongly influenced by TeX. Like tables, the format uses a
Dave Raggett Page 4
HTML 3.0 28th March 1995
lightweight style of markup - simple enough to type in by hand,
although it will in most cases be easier to use a filter from a word
processing format or a direct HTML 3.0 wysiwyg editor. The level of
support is compatible with most word processing software, and avoids
the drawbacks from having to convert math to inline images.
The Web has acted as a huge exercise in user testing, and we have
been able to glean lots of information from the ways people abuse
HTML in trying to get a particular effect; as well as from explicit
demand for new features. HTML 3.0, as a result, includes support for
customised lists; fine positioning control with entities like
&emspace; horizontal tabs and horizontal alignment of headers and
paragraph text.
Additional features include a static banner area for corporate
logos, disclaimers and customized navigation/search controls. The
LINK element can be used to provide standard toolbar/menu items for
navigation, such as previous and next buttons. The NOTE element is
used for admonishments such as notes, cautions or warnings, and also
used for footnotes.
Forms have been extended to support graphical selection menus with
client-side handling of events similar to FIG. Other new form field
types include range controls, scribble on image, file upload and
audio input fields. Client-side scripting of forms is envisaged with
the script attribute of the FORM element. Forms and tables make for
a powerful combination offering rich opportunities for laying out
custom interfaces to remote information systems.
To counter the temptation to add yet more presentation features,
HTML 3.0 is designed (but doesn't require) to be used together with
style sheets which give rich control over document rendering, and
can take into account the user's preferences, the window size and
other resource limitations, such as which fonts are actually
available. This work will eventually lead to smart layout under the
author's control, with rich magazine style layouts for full screen
viewing, switching to simpler layouts when the window is shrunk.
The SGML Open consortium is promoting use of DSSSL Lite by James
Clark. This is a simplified subset of DSSSL - the document style
semantics specification language. DSSSL is a ISO standard for
representing presentation semantics for SGML documents, but is much
too complex in its entirety to be well suited to the World Wide Web.
Håkon Lie maintains a list of pointers to work on style sheets.
Transition Strategy from HTML 2.0
The use of the MIME content type: "text/html; version=3.0" is
recommended to prevent existing HTML 2.0 user agents screwing up by
attempting to show 3.0 documents. Tests have shown that the
suggested content type will safely cause existing user agents to
display the save to file dialog rather than incorrectly displaying
the document as if it were HTML 2.0.
Dave Raggett Page 5
HTML 3.0 28th March 1995
To make it easy for servers to distinguish 3.0 documents from 2.0
documents, it is suggested that 3.0 files are saved with the
extension ".html3" (or ".ht3" for PCs). Servers can also exploit the
accept headers in HTTP requests from HTML user agents, to
distinguish whether each client can or cannot support HTML 3.0. This
makes it practical for information providers to start providing HTML
3.0 versions of existing documents for newer user agents, without
impacting older user agents. It is envisaged that programs will be
made available for automatic down conversion of 3.0 to 2.0
documents. This conversion could be carried out in batch mode, or on
the fly (with caching for greater efficiency).
Design Guidelines
The HTML 3.0 draft specification has been written to the following
guidelines.
Lingua Franca for the Web
HTML is intended as a common medium for tying together information
from widely different sources. A means to rise above the
interoperability problems with existing document formats, and a
means to provide a truly open interface to proprietary information
systems.
Simplicity
The first version of HTML was designed to be extremely simple, both
to author and to write browsers for. This has played a major role in
the incredibly rapid growth of the World Wide Web. HTML 3.0 provides
a clean superset of HTML 2.0 adding high value features such as
tables, text flow around figures and math, while still remaining a
simple document format. The pressures to adopt the complexities of
traditional SGML applications has been resisted, for example the
Department of Defense's CALS table model or the ISO 12083 math DTD.
Scaleability
As time goes by, people's expectations change, and more will be
demanded of HTML. One manifestation of this is the pressure to add
yet more tags. HTML 3.0 introduces a means for subclassing elements
in an open-ended way. This can be used to distinguish the role of a
paragraph element as being a couplet in a stansa, or a mathematical
term as being a tensor. This ability to make fresh distinctions can
be exploited to impart distinct rendering styles or to support
richer search mechanisms, without further complicating the HTML
document format itself. Scaleability is also achieved via URI based
links for embedding information in other formats. Initially limited
to a few image formats, inline support is expected to rapidly evolve
to cover drawing formats, video, distributed virtual reality and a
general means for embedding other applications.
Dave Raggett Page 6
HTML 3.0 28th March 1995
Platform Independence
HTML is designed to allow rendering on a very wide range of devices,
from clunky teletypes, to terminals, DOS, Windows, Macs and high end
Workstations, as well as non-visual media such as speech and
braille. In this, it allows users to exploit the legacy of older
equipment as well as the latest and best of new machines. HTML 3.0
provides for improved support for non-graphical clients, allowing
for rich markup in place of the figures shown on graphical clients.
HTML can be rendered on a wide variety of screen sizes, using a
scrolling or paged model. The fonts and presentation can be adjusted
to suit the resources available in the host machine and the user's
preferences.
Content --not-- Presentation Markup
Information providers are used to tight control over the final
appearence of documents. The need for platform independence weighs
against this, but there is still a strong pressure to find
appropriate means for information providers to express their
intentions. The experience with proprietary document formats has
shown the dangers of mixing presentation markup with content (or
structural) markup. It becomes difficult to apply different
presentation styles. It becomes painful to incorporate material from
different sources (with different presentation styles). It becomes
difficult to be truly platform independent. As a result, HTML 3.0 is
designed for use with linked style information that defines the
intended presentation style for each element. Style sheets can be
expressed in a platform independent fashion or used to provide more
detailed control for particular classes of clients or output media.
Support for Cascaded Style Sheets
For the Web, it is valuable to allow for a cascading of style
preferences. The client has certain built-in preferences; the
publisher may require a particular house style, e.g. for brand
distinction; the author may feel the need to override the house
style for special cases; the end-user may feel strongly about
certain things, e.g. large fonts for easier visibility or avoiding
certain colors due to an inability to distinguish between them. HTML
3.0 supports style sheets via the use of the LINK element to
reference a style sheet with a URI. Authors can place overrides in
separate style sheets or include them in the document head within
the STYLE element. The effectiveness of caching mechanisms for
speeding up the retrieval of style sheets is enhanced by the
separation of style information into generic commonly used style
sheets, and overrides specific to this document.
Support for Non-Visual Media
HTML 3.0 is designed to cater for the needs of the visually
impaired. Markup for inline figures includes support for rich
descriptions, along with hypertext links that double up as defining
Dave Raggett Page 7
HTML 3.0 28th March 1995
geometric hotzones for graphical browsers, simplifying the author's
job in catering for the different groups of users. Table markup
includes provision for abbreviated row and column names for each
cell, which are essential for conversion to speech or braille. Math
markup treats formulae and equations as hierarchies of expressions.
This allows disambiguating pauses to be inserted in appropriate
places during conversion to speech.
Support for different ways of creating HTML
HTML 3.0 has been designed to be created in a variety of different
ways. It is deliberately simple enough to type in by hand. It can be
authored using wysiwyg editors for HTML, or it can be generated via
export filters from common word processing formats, or other SGML
applications.
Dave Raggett Page 8
HTML 3.0 28th March 1995
Understanding HTML and MIME
--I have dropped the differentiation of HTML into a sequence of
conformance levels. Many people confused levels with versions. The
different levels also encourage interoperability problems! Lets
encourage full conformance with HTML 2.0 or HTML 3.0 rather than
perpetuating intermediate levels of support.--
HTML as an Internet Media Type
This (and upward compatible specifications) define the Internet
Media Type (RFC 1590) and MIME Content Type (RFC 1521) called
"text/html". The type "text/html" accepts the following parameters:
Version
To help avoid future compatibility problems, the version
parameter may be used to give the version number of the
specification to which the document conforms. The version number
appears at the front of this document and within the public
identifier for the SGML DTD. This specification defines version
3.0.
Character sets
The charset parameter (as defined in section 7.1.1 of RFC 1521)
may be used with the text/html content type to specify the
encoding used to represent the HTML document as a sequence of
bytes. Normally, text/* media types specify a default of
US-ASCII for the charset parameter. However, for text/html, if
the byte stream contains data that is not in the 7-bit US-ASCII
set, the HTML interpreting agent should assume a default charset
of ISO-8859-1.
When an HTML document is encoded using US-ASCII, the mechanisms
of numeric character references and character entity references
may be used to encode additional characters from ISO-8859-1.
Character entity references are needed for symbols such as math
and greek characters from other unspecified character sets.
Other values for the charset parameter are not defined in this
specification, but may be specified in future versions of HTML.
It is envisioned that HTML will use the charset parameter to
allow support for non-Latin characters such as Arabic, Hebrew,
Cyrillic and Japanese, rather than relying on any SGML mechanism
for doing so.
--What about Unicode and its assorted encodings? This section
would benefit from an explanation of the issues underlying
support for multiple character sets and the problems arising
from bidirectionality.--
Dave Raggett Page 9
HTML 3.0 28th March 1995
Understanding HTML and SGML
HTML is an application conforming to International Standard ISO 8879
-- Standard Generalized Markup Language (SGML). SGML is a system for
defining structured document types, and markup languages to
represent instances of those document types. The SGML declaration
for HTML is given in SGML Declaration for HTML. It is implicit among
WWW implementations.
In the event of any apparent conflict between HTML and SGML
standards, the SGML standard is definitive.
Every SGML document has three parts:
SGML declaration
Binds SGML processing quantities and syntax token names to
specific values. For example, the SGML declaration in the HTML
DTD specifies that the string that opens an end tag is </ and
the maximum length of a name is 72 characters.
Prologue
Includes one or more document type declarations (DTDs), which
specify the element types, element relationships and attributes.
The HTML 3.0 DTD provides a definitive specification of the
allowed syntax for HTML 3.0 documents.
References
Can be represented by markup. An instance, which contains the
data and markup of the document.
HTML refers to the document type as well as the markup language for
representing instances of that document type.
------------------------------------------------------------------------------
Understanding HTML Elements
In HTML documents, tags define the start and end of headings,
paragraphs, lists, character highlighting and links. Most HTML
elements are identified in a document as a start tag, which gives
the element name and attributes, followed by the content, followed
by the end tag. Start tags are delimited by < and >, and end tags
are delimited by </ and >. For example:
<H1>This is a Heading</H1>
<P>This is a paragraph.
Some elements appear as just a start tag. For example, to create a
line break, you use <BR>. Additionally, the end tags of some other
elements (e.g. P, LI, DT, DD) can be omitted as the position of the
end tag is clearly implied by the context.
The content of an element is a sequence of characters and nested
elements. Some elements, such as anchors, cannot be nested. Anchors
Dave Raggett Page 10
HTML 3.0 28th March 1995
and character highlighting may be put inside other constructs. The
content model for a tag defines the syntax permitted for the
content.
Note: The SGML declaration for HTML specifies SHORTTAG YES, which
means that there are other valid syntaxes for tags, such as NET
tags, <EM/.../; empty start tags, <>; and empty end tags, </>. Until
support for these idioms is widely deployed, their use is strongly
discouraged.
------------------------------------------------------------------------------
Names
The element name immediately follows the tag open delimiter. An
element name consist of a letter followed by up to 72 letters,
digits, periods, or hyphens. Names are not case sensitive. For
example, H1 is equivalent to h1. This limit of 72 characters is set
by the NAMELEN parameter in the SGML declaration for HTML 3.0.
------------------------------------------------------------------------------
Attributes
In a start tag, white space and attributes are allowed between the
element name and the closing delimiter. An attribute typically
consists of an attribute name, an equal sign, and a value (although
some attributes may be just a value). White space is allowed around
the equal sign.
The value of the attribute may be either:
1. A string literal, delimited by single quotes or double quotes
2. A name token (a sequence of letters, digits, periods, or
hyphens)
In this example, a is the element name, href is the attribute name,
and http://host/dir/file.html is the attribute value:
<A HREF="http://host/dir/file.html">
Some implementations consider any occurrence of the > character to
signal the end of a tag. For compatibility with such
implementations, when > appears in an attribute value, you may want
to represent it with an entity or numeric character reference, such
as:
<IMG SRC="eq1.ps" alt="a > b">
To put quotes inside of quotes, you can use single quotes if the
outer quotes are double or vice versa, as in:
<IMG SRC="image.ps" alt="First 'real' example">
Dave Raggett Page 11
HTML 3.0 28th March 1995
Alternatively, you use the character representation " as in:
<IMG SRC="image.ps" alt="First "real" example">
The length of an attribute value (after replacing entity and numeric
character references) is limited to 1024 characters. This number is
defined by the LITLEN parameter in the SGML declaration for HTML
3.0.
Note: Some implementations allow any character except space or > in
a name token. Attributes values must be quoted only if they don't
satisfy the syntax for a name token.
Attributes with a declared value of NAME (e.g. ISMAP, COMPACT) may
be written using a minimized syntax. The markup:
<UL COMPACT="compact">
can be written as:
<UL COMPACT>
Note: Unless you use the minimized syntax, some implementations
won't understand.
------------------------------------------------------------------------------
Undefined Tag and Attribute Names
It is an accepted networking principle to be conservative in that
which one produces, and liberal in that which one accepts. HTML
parsers should be liberal except when verifying code. HTML
generators should generate strictly conforming HTML. It is suggested
that where ever practical, parsers should at least flag the presence
of markup errors, as this will help to avoid bad markup being
produced inadvertently.
The behavior of WWW applications reading HTML documents and
discovering tag or attribute names which they do not understand
should be to behave as though, in the case of a tag, the whole tag
had not been there but its content had, or in the case of an
attribute, that the attribute had not been present.
------------------------------------------------------------------------------
Special Characters
The characters between the tags represent text in the ISO-Latin-1
character set, which is a superset of ASCII. Because certain
characters will be interpreted as markup, they should be represented
by markup -- entity or numeric character references, for instance
the character "&" must be represented by the entity &. See the
Special Characters section of this specification for more
information.
Dave Raggett Page 12
HTML 3.0 28th March 1995
------------------------------------------------------------------------------
Comments
To include comments in an HTML document that will be ignored by the
parser, surround them with <!-- and -->. After the comment
delimiter, all text up to the next occurrence of --> is ignored.
Hence comments cannot be nested. White space is allowed between the
closing -- and >, but not between the opening <! and --.
For example:
<HEAD>
<TITLE>HTML Guide: Recommended Usage</TITLE>
<!-- Id: Text.html,v 1.6 1994/04/25 17:33:48 connolly Exp -->
</HEAD>
Note: Some historical implementations incorrectly consider a > sign
to terminate a comment.
------------------------------------------------------------------------------
Formal Variants of HTML 3.0
The HTML 3.0 document type definition includes two flags for
controlling how prescriptive or how lax the language is. This makes
use of SGML marked sections in the DTD to enable or disable certain
features.
HTML.Recommended
Certain features of the language are necessary for compatibility
with widespread usage, but they may compromise the structural
integrity of a document. The HTML.Recommended entity should be
defined as INCLUDE in the DTD subset to enable a more prescriptive
version of HTML 3.0 that eliminates the above features. For example:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN"
[ <!ENTITY % HTML.Recommended "INCLUDE"> ] >
In particular, this prevents text from appearing except within block
elements.
HTML.Deprecated
By default, for backwards compatibility, the %HTML.Deprecated entity
is defined as INCLUDE, enabling certain features which are now
deprecated. These features can be eliminated by defining this entity
as IGNORE in the DTD subset. For example:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN" [
<!ENTITY % HTML.Deprecated "IGNORE"> ] >
Note: defining %HTML.Recommended as INCLUDE automatically sets
%HTML.Deprecated to IGNORE.
Dave Raggett Page 13
HTML 3.0 28th March 1995
In the spirit of being liberal in what you accept and strict in what
you generate, HTML user agents are recommended to accept syntax
corresponding to the specification with %HTML.Deprecated turned on,
while HTML user agents generating HTML are recommended to generate
documents that conform to the specification with %HTML.Recommended
turned on.
Dave Raggett Page 14
HTML 3.0 28th March 1995
The Structure of HTML 3.0 Documents
In HTML documents, tags define the start and end of headings,
paragraphs, lists, character highlighting and links etc. Most HTML
elements are identified in a document as a start tag, which gives
the element name and attributes, followed by the content, followed
by the end tag. Start tags are delimited by < and >, while end tags
are delimited by </ and >. For example:
<title>This is a Title</title>
<h1>This is a Heading</h1>
<P>This is a paragraph.
Every HTML document as a minimum must have a title. To identify the
document as being HTML 3.0, it is recommended that documents start
with the prologue:
<!doctype HTML public "-//W3O//DTD W3 HTML 3.0//EN">
When absent, this prologue is implied by the MIME content type for
HTML 3.0 together with the associated version parameter.
------------------------------------------------------------------------------
Document Structure
HTML 3.0 documents formally have the following structure:
<HTML>
<HEAD> --head elements ...--
<BODY> --body elements ...--
</HTML>
In most cases, the HTML, HEAD and BODY tags can be safely omitted.
Note that the formal syntax of HTML 3.0 is defined by the document
type definition, which is included as an appendix of this
specification. The details of the HEAD and BODY elements will be
described in subsequent sections.
The permitted syntax of HTML 3.0 compliant documents is specified by
the DTD. This includes the content model for each element, defining
what markup is permitted within each element. The DTD uses SGML
entities in content models to express regular features of HTML 3.0,
for example %body.content defines what markup is permitted within
the BODY element. A number of other elements also share this content
model, e.g. BQ, DIV, FORM, TH and TD.
The description of each tag includes the --content model-- and the
--permitted context-- (which elements can contain this tag). Where
practical, these properties are given with the same entity names as
used in the DTD, and should help the newcomer to get to grips with
understanding the DTD itself. For example, the description of the
NOTE element starts with:
Dave Raggett Page 15
HTML 3.0 28th March 1995
The NOTE element
Permitted context: %block
Content model: %flow
This says that the NOTE element (used for admonishments such as
notes, cautions and errors) can occur in any element which includes
%block in its content model. Similarly, any element with %flow as
part of its permitted context can occur within a NOTE element.
The HTML element
This has three attributes:
VERSION
This is fixed by the DTD as the string "-//W3O//DTD W3 HTML
3.0//EN"
URN
The universal resource name for the document (optional)
ROLE
An optional space separated list of SGML NAME tokens that define
the role this document plays, e.g. table of contents. The
conventions for these names are outside the scope of this
specification. --wouldn't it be better to leave this to a link
to a URC?--
Note that both the start and end tag for the HTML element can be
omitted.
Dave Raggett Page 16
HTML 3.0 28th March 1995
The Head Element and Related Elements
HEAD
The HEAD element has no attributes and the start and end tag can
always be safely omitted as they can be readily inferred by the
parser. Information in the HEAD element corresponds to the top part
of a memo or mail message. It describes properties of the document
such as the title, the document toolbar, and additional
meta-information. There is no intended significance to the order of
elements in the document head. Note that the TITLE element is always
required. In fact, the minimal HTML 3.0 document consists of the
TITLE element alone!
Within the HEAD element, only certain elements are allowed.
Information in the HEAD element may include the following elements
(arranged alphabetically):
------------------------------------------------------------------------------
BASE
The BASE element allows the URL of the document itself to be
recorded in situations in which the document may be read out of
context. URLs within the document may be in a "partial" form
relative to this base address. The default base address is the URL
used to retrieve the document.
For example:
<base href="http://acme.com/docs/mydoc.html">
...
<img src="images/me.gif">
which resolves to "http://acme.com/docs/images/me.gif".
------------------------------------------------------------------------------
ISINDEX
The ISINDEX element informs the HTML user agent that the document is
an index document. As well as reading it, the reader may use a
keyword search.
The document can be queried with a keyword search by adding a
question mark to the end of the document address, followed by a list
of keywords separated by plus signs. See the network address format
for more information.
Note: A server normally generates the ISINDEX tag automatically. If
added by hand to an HTML document, the browser assumes that the
server can handle a search on the document. Obviously the server
must have this capability for it to work: simply adding <ISINDEX> in
the document is not enough to make searches happen if the server
does not have a search engine!
Dave Raggett Page 17
HTML 3.0 28th March 1995
Example:
<ISINDEX>
The URL used for processing queries can be overridden with the HREF
attribute. You can also use the PROMPT attribute to change the
default prompt supplied by the browser, e.g.
<ISINDEX HREF="phone.db" PROMPT="Enter Surname:">
------------------------------------------------------------------------------
LINK
The LINK element indicates a relationship between the document and
some other object. A document may have any number of LINK elements.
The LINK element is empty (does not have a closing tag), but takes
the same attributes as the anchor element. The important attributes
are:
REL
This defines the relationship defined by the link.
REV
This defines a reverse relationship. A link from document A to
document B with REV=--relation-- expresses the same relationship
as a link from B to A with REL=--relation--. REV=made is
sometimes used to identify the document author, either the
author's email address with a --mailto-- URI, or a link to the
author's home page.
HREF
This names an object using the URI notation.
Using LINK to define document specific toolbars
An important use of the LINK element is to define a toolbar of
navigation buttons or an equivalent mechanism such as menu items.
LINK relationship values reserved for toolbars are:
REL=Home
The link references a home page or the top of some hierarchy.
REL=ToC
The link references a document serving as a table of contents.
REL=Index
The link references a document providing an index for the
current document.
REL=Glossary
The link references a document providing a glossary of terms
Dave Raggett Page 18
HTML 3.0 28th March 1995
that pertain to the current document.
REL=Copyright
The link references a copyright statement for the current
document.
REL=Up
When the document forms part of a hierarchy, this link
references the immediate parent of the current document.
REL=Next
The link references the next document to visit in a guided tour.
REL=Previous
The link references the previous document in a guided tour.
REL=Help
The link references a document offering help, e.g. describing
the wider context and offering further links to relevant
documents. This is aimed at reorienting users who have lost
their way.
REL=Bookmark
Bookmarks are used to provide direct links to key entry points
into an extended document. The TITLE attribute may be used to
label the bookmark. Several bookmarks may be defined in each
document, and provide a means for orienting users in extended
documents.
An example of toolbar LINK elements:
<LINK REL=Previous HREF=doc31.html>
<LINK REL=Next HREF=doc33.html>
<LINK REL=Bookmark TITLE="Order Form" HREF=doc56.html>
Using LINK to include a Document Banner
The LINK element can be used with REL=Banner to reference another
document to be used as banner for this document. This is typically
used for corporate logos, navigation aids, and other information
which shouldn't be scrolled with the rest of the document. For
example:
<LINK REL=Banner HREF=banner.html>
The use of a LINK element in this way, allows a banner to be shared
between several documents, with the benefit of being able to
separately cache the banner. Rather than using a linked banner, you
can also include the banner in the document itself, using the BANNER
element.
Link to an associated Style Sheet
Dave Raggett Page 19
HTML 3.0 28th March 1995
The LINK element can be used with REL=StyleSheet to reference a
style sheet to be used to control the way the current document is
rendered. For example:
<LINK REL=StyleSheet HREF=housestyle.dsssl>
Other uses of the LINK element
Additional relationship names have been proposed, but do not form
part of this specification. Servers may also allow links to be added
by those who do not have the right to alter the body of a document.
------------------------------------------------------------------------------
META
The META element is used within the HEAD element to embed document
meta-information not defined by other HTML elements. Such
information can be extracted by servers/clients for use in
identifying, indexing and cataloging specialized document
meta-information.
Although it is generally preferable to used named elements that have
well defined semantics for each type of meta-information, such as
title, this element is provided for situations where strict SGML
parsing is necessary and the local DTD is not extensible.
In addition, HTTP servers can read the contents of the document head
to generate response headers corresponding to any elements defining
a value for the attribute HTTP-EQUIV. This provides document authors
with a mechanism (not necessarily the preferred one) for identifying
information that should be included in the response headers of an
HTTP request.
The META element has three attributes:
NAME
Used to name a property such as author, publication date etc. If
absent, the name can be assumed to be the same as the value of
HTTP-EQUIV.
CONTENT
Used to supply a value for a named property.
HTTP-EQUIV
This attribute binds the element to an HTTP response header. If
the semantics of the HTTP response header named by this
attribute is known, then the contents can be processed based on
a well defined syntactic mapping, whether or not the DTD
includes anything about it. HTTP header names are not case
sensitive. If absent, the NAME attribute should be used to
identify this meta-information and it should not be used within
an HTPP response header.
Dave Raggett Page 20
HTML 3.0 28th March 1995
Examples:
If the document contains:
<META HTTP-EQUIV=Expires CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
<META HTTP-EQUIV="Keywords" CONTENT="Nanotechnology, Biochemistry">
<META HTTP-EQUIV="Reply-to" CONTENT="dsr@w3.org (Dave Raggett)">
The server will include the following response headers:
Expires: Tue, 04 Dec 1993 21:29:02 GMT
Keywords: Nanotechnology, Biochemistry
Reply-to: dsr@w3.org (Dave Raggett)
When the HTTP-EQUIV attribute is absent, the server should not
generate an HTTP response header for this meta-information, e.g.
<META NAME="IndexType" CONTENT="Service">
Do not use the META element to define information that should be
associated with an existing HTML element.
Example of an inappropriate use of the META element:
<META NAME="Title" CONTENT="The Etymology of Dunsel">
Do not name an HTTP-EQUIV attribute the same as a response header
that should typically only be generated by the HTTP server. Some
inappropriate names are "Server", "Date", and "Last-Modified".
Whether a name is inappropriate depends on the particular server
implementation. It is recommended that servers ignore any META
elements that specify HTTP equivalents (case insensitively) to their
own reserved response headers.
------------------------------------------------------------------------------
NEXTID
The NEXTID is a parameter read and generated by text editing
software to generate unique identifiers. This tag takes a single
attribute which is the the next document-wide alpha-numeric
identifier to be allocated of the form z123.
When modifying a document, existing anchor identifiers should not be
reused, as these identifiers may be referenced by other documents.
Human writers of HTML usually use mnemonic alphabetical identifiers.
Example:
<NEXTID N=Z27>
HTML user agents may ignore the NEXTID element. Support for NEXTID
does not impact HTML user agents in any way.
Dave Raggett Page 21
HTML 3.0 28th March 1995
--I want to get rid of NEXTID, or at least deprecate it!--
------------------------------------------------------------------------------
RANGE
The RANGE element is used to mark a range of the document, for
example for highlighting regions of the document matching some
search criteria, or which are the subject of an annotation etc.
<RANGE CLASS=Search FROM=spot01 UNTIL=spot02>
The FROM and UNTIL attributes specify positions in the document
using SGML identifiers. Most elements in the document body can
define such identifiers using ID attributes. The SPOT element is
useful in this regard, as it allows search software etc. to insert
IDs at random places:
<SPOT ID=spot01> ... <SPOT ID=spot02>
The RANGE element supports the following attributes:
ID
An SGML identifer used to name the range element.
CLASS
A character string used to subclass the range element.
FROM
References an SGML identifier for an element in the document
body. It identifies the start of the marked range.
UNTIL
References an SGML identifier for an element in the document
body. It identifies the end of the marked range.
------------------------------------------------------------------------------
STYLE
The STYLE element provides a means for including rendering
information using a specified style notation. Information in the
STYLE element overrides client defaults and that of linked style
sheets. It allows authors to specify overrides, while for the most
part using a generic style sheet, and as such improves the
effectiveness of caching schemes for linked style sheets. There is
one attribute - NOTATATION - which specifies an entity identifying
an SGML notation in the HTML 3.0 DTD, for example:
<style notation=dsssl-lite>
--some dsssl-lite stuff ...--
</style>
Stylistic rules will in general match tag names and attribute values
Dave Raggett Page 22
HTML 3.0 28th March 1995
for elements in the document body. Context sensitive rules may be
used for such purposes as rendering drop down capitals for the
initial letter in the first paragraph following a header.
------------------------------------------------------------------------------
TITLE
Every HTML document must contain a TITLE element. The title should
identify the contents of the document in a global context, and may
be used in a history lists and as a label for the window displaying
the document. Unlike headings, titles are not normally displayed in
the text of a document itself.
The TITLE element must occur within the head of the document, and
may not contain anchors, paragraph tags, or highlighting. There may
only be one TITLE in any document.
The length of titles is unlimited, however, long titles may be
truncated in some applications. To minimize this possibility, keep
titles to fewer than 64 characters. Also keep in mind that a short
title, such as Introduction, may be meaningless out of context. An
example of a meaningful title might be:
<Title>Recent Advances in Nanotechnology</Title>
Dave Raggett Page 23
HTML 3.0 28th March 1995
The Body Element and Related Elements
The BODY element
Permitted Context: HTML
Content Model: %Body.Content
Within the BODY element, you can structure text into paragraphs, and
lists, as well as highlighting phrases and creating links, amongst
other things. The BODY element has the following attributes, all of
which are optional:
Note that the ID, LANG and CLASS attributes can be used with
virtually all of the elements permitted in the document body.
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. For instance, <P CLASS=STANZA.COUPLET>
defines a paragraph that acts as a couplet in a stanza. By
convention, the class names are interpreted hierarchically, with
the most general class on the left and the most specific on the
right, where classes are separated by a period. The CLASS
attribute is most commonly used to attach a different style to
some element, but it is recommended that where practical class
names should be picked on the basis of the element's semantics,
as this will permit other uses, such as restricting search
through documents by matching on element class names. The
conventions for choosing class names are outside the scope of
this specification.
BACKGROUND
This can be used to specify a URI for an image tile to cover the
document background. This provides a way of giving a group of
documents a distinctive appearence. Clients may ignore this
attribute. It is included here for the benefit of clients that
don't support style sheets. Note that the text color may need to
be adjusted to show an adequate contrast with the background.
Dave Raggett Page 24
HTML 3.0 28th March 1995
Note that you don't need to include a BODY tag unless you want to
specify one of the above attributes.
Body Structure
The document body is composed from zero or more of the following
elements:
* DIV - used for hierarchical containers and static banners
* Headings (H1, to H6) - a set of headers of varying levels of
importance
* Block elements - paragraphs, lists, forms, tables, figures and
other elements
* Horizontal rules, and the ADDRESS element
* Text and character level markup including emphasis, images,
math, hypertext links and miscellaneous elements.
Note that text and character level markup are only permitted at this
level for backwards compatibility with legacy documents. The
HTML.Recommended flag enforces a more structured approach to
authoring HTML documents.
Dave Raggett Page 25
HTML 3.0 28th March 1995
Banners
Permitted Context: the start of the BODY element
Content Model: %Body.Content
The BANNER element is used for corporate logos, navigation aids,
disclaimers and other information which shouldn't be scrolled with
the rest of the document. It provides an alternative to using the
LINKelement in the document head to reference an externally defined
banner.
Permitted Attributes
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
Dave Raggett Page 26
HTML 3.0 28th March 1995
Divisions
Permitted Context: %Body.Content
Content Model: %Body.Content
The DIV element is used with the CLASS attribute to represent
different kinds of containers, e.g. chapter, section, abstract, or
appendix. For example:
<DIV CLASS=Abstract>
<P>TheChieftain product range is the white hot hope for the
coming year. This report sets out how to position Chieftain
against competing products.
</DIV>
Permitted Attributes
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. For instance, <DIV CLASS=APPENDIX> defines a
division that acts as an appendix. By convention, the class
names are interpreted hierarchically, with the most general
class on the left and the most specific on the right, where
classes are separated by a period. The CLASS attribute is most
commonly used to attach a different style to some element, but
it is recommended that where practical class names should be
picked on the basis of the element's semantics, as this will
permit other uses, such as restricting search through documents
by matching on element class names. The conventions for choosing
class names are outside the scope of this specification.
ALIGN
The ALIGN attribute can be used to explicitly specify the
horizontal alignment of paragraphs within a division:
align=left
Dave Raggett Page 27
HTML 3.0 28th March 1995
Paragraphs are rendered flush left (the default).
align=center
Paragraphs are centered.
align=right
Paragraphs are rendered flush right.
align=justify
Text lines are justified where practical, otherwise this
gives the same effect as the default align=left setting.
NOWRAP
The NOWRAP attribute is used when you don't want the browser to
automatically wrap lines. You can then explicitly specify line
breaks in paragrphs using the BR element.
CLEAR
This attribute is common to all block-like elements. When text
flows around a figure or table in the margin, you sometimes want
to start the division below the figure rather than alongside it.
The CLEAR attribute allows you to move down unconditionally:
clear=left
move down until left margin is clear
clear=right
move down until right margin is clear
clear=all
move down until both margins are clear
Alternatively, you can decide to place the element alongside the
figure just so long as there is enough room. The minimum width
needed is specified as:
clear="40 en"
move down until there is at least 40 en units free
clear="100 pixels"
move down until there is at least 100 pixels free
The style sheet (or browser defaults) may provide default
minimum widths for each class of block-like elements.
Dave Raggett Page 28
HTML 3.0 28th March 1995
Headings
Permitted Context: %Body.Content
Content Model: %text
HTML defines six levels of headings. A heading element implies all
the font changes, paragraph breaks before and after, and any white
space necessary to render the heading. The heading elements are H1,
H2, H3, H4, H5, and H6 with H1 being the highest (or most important)
level and H6 the least. For example:
<H1>This is a top level heading</H1> Here is some text.
<H2>Second level heading</H2> Here is some more text.
Use the DIV element together with header elements when you want to
make the hierarchical structure of a document explicit. This is
needed as header elements themselves only contain the text of the
header, and do not imply any structural division of documents into
sections. Header elements have the same content model as paragraphs,
that is text and character level markup, such as character emphasis,
inline images, form fields and math.
Headers play a related role to lists in structuring documents, and
it is common to number headers or to include a graphic that acts
like a bullet in lists. HTML 3.0 recognizes this with attributes
that assist with numbering headers and allow authors to specify a
custom graphic.
The numbering style is controlled by the style sheet, e.g.
1. The style sheet specifies whether headers are numbered, and
which style is used to render the current sequence number, e.g.
arabic, upper alpha, lower alpha, upper roman, lower roman or a
numbering scheme appropriate to the current language.
2. Whether the parent numbering is inherited, e.g. "5.1.d" where 5
is the current sequence number for H1 headers, 1 is the number
for H2 headers and 4 for H3 headers.
The seqnum and skip attributes can be used to override the default
treatment of header sequence numbers, and provide for a continuity
with numbered lists.
The dingbat or src attribute may be used to specify a bullet-like
graphic to be placed adjacent to the header. The positioning of this
graphic is controlled by the style sheet. The graphic is for
decorative purposes only and silently ignored on non-graphical HTML
user agents.
Word Wrapping
User agents are free to wrap lines at whitespace characters so as to
ensure lines fit within the current window size. Use the
Dave Raggett Page 29
HTML 3.0 28th March 1995
entity for the non-breaking space character, when you want to make
sure that a line isn't broken! Alternatively, use the NOWRAP
attribute to disable word wrapping and the <BR> element to force
line breaks where desired.
--Netscape includes two tags: <NOBR>...</NOBR>, and <WBR>. The
former turns off wordwrapping between the start and end NOBR tag,
while WBR is for the rare case when you want to specify where to
break the line if needed. Should HTML 3.0 provide an equivalent
mechanism to WBR, (either a tag or an entity)?--
Permitted Attributes
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. For instance, <H2 CLASS=Section> defines a
level 2 header that acts as a section header. By convention, the
class names are interpreted hierarchically, with the most
general class on the left and the most specific on the right,
where classes are separated by a period. The CLASS attribute is
most commonly used to attach a different style to some element,
but it is recommended that where practical class names should be
picked on the basis of the element's semantics, as this will
permit other uses, such as restricting search through documents
by matching on element class names. The conventions for choosing
class names are outside the scope of this specification.
ALIGN
Headings are usually rendered flush left. The ALIGN attribute
can be used to explicitly specify the horizontal alignment:
align=left
The heading is rendered flush left (the default).
align=center
The heading is centered.
Dave Raggett Page 30
HTML 3.0 28th March 1995
align=right
The heading is rendered flush right.
align=justify
Heading lines are justified where practical, otherwise this
gives the same effect as the default align=left setting.
For example:
<h1 align=center>This is a centered heading</H1>
Here is some text. <H2 align=right>and this is a flush right
heading</H2> Here is some more text.
CLEAR
This attribute is common to all block-like elements. When text
flows around a figure or table in the margin, you sometimes want
to start an element like a header, paragraph or list below the
figure rather than alongside it. The CLEAR attribute allows you
to move down unconditionally:
clear=left
move down until left margin is clear
clear=right
move down until right margin is clear
clear=all
move down until both margins are clear
Alternatively, you can decide to place the element alongside the
figure just so long as there is enough room. The minimum width
needed is specified as:
clear="40 en"
move down until there is at least 40 en units free
clear="100 pixels"
move down until there is at least 100 pixels free
The style sheet (or browser defaults) may provide default
minimum widths for each class of block-like elements.
SEQNUM
A sequence number is associated with each level of header from
the top level (H1) to the bottom level (H6). This attribute is
used to set the sequence number associated with the header level
of the current element to a given number, e.g. SEQNUM=10.
Normally, the sequence number is initialized to 1 at the
Dave Raggett Page 31
HTML 3.0 28th March 1995
beginning of the document and incremented after each header
element. It is reset to 1 by any header element of a higher
level, e.g. an H1 header resets the sequence numbers for H2 to
H6. The style of header numbering is controlled by the style
sheet.
SKIP
Increments the sequence number before rendering the element. It
is used when headers have been left out of the sequence. For
instance, SKIP=3 advances the sequence number past 3 omitted
items.
DINGBAT
Specifies an iconic image to appear preceding the header. The
icon is specified as an entity name. A list of standard icon
entity names for HTML 3.0 is given in an appendix of this
specification.
SRC
Specifies an image to appear preceding the header. The image is
specified as a URI. This attribute may appear together with the
MD attribute.
MD
Specifies a message digest or cryptographic checksum for the
associated graphic specified by the SRC attribute. It is used
when you want to be sure that a linked object is indeed the same
one that the author intended, and hasn't been modified in any
way. For instance, MD="md5:jV2OfH+nnXHU8bnkPAad/mSQlTDZ", which
specifies an MD5 checksum encoded as a base64 character string.
The MD attribute is generally allowed for all elements which
support URI based links.
NOWRAP
The NOWRAP attribute is used when you don't want the browser to
automatically wrap lines. You can then explicitly specify line
breaks in headings using the BR element. For example:
<h1 nowrap>This heading has wordwrap turned off<br>
and the BR element is used for explicit line breaks</H1>
Dave Raggett Page 32
HTML 3.0 28th March 1995
Paragraphs
Permitted Context: %Body.Content, %flow, %block
Content Model: %text
The <P> element is used to define a paragraph. The exact rendering
(indentation, leading etc.) is not defined and may be a function of
other tags, style sheets, etc. The ALIGN attribute can be used to
explicitly specify the horizontal alignment. Paragraph elements have
the same content model as headers, that is text and character level
markup, such as character emphasis, inline images, form fields and
math.
Example:
<H1>The heading precedes the first paragraph</H1>
<P>Here is the text of the first paragraph. <P>and this is
the text of the second paragraph.
The text up to the next <p> element is treated as being part of the
current paragraph. This is an example of how SGML allows certain end
tags like </p> to be left out where they can be inferred from the
context.
Word Wrapping
User agents are free to wrap lines at whitespace characters so as to
ensure lines fit within the current window size. Use the
entity for the non-breaking space character, when you want to make
sure that a line isn't broken! Alternatively, use the NOWRAP
attribute to disable word wrapping and the <BR> element to force
line breaks where desired.
--Netscape includes two tags: <NOBR>...</NOBR>, and <WBR>. The
former turns off wordwrapping between the start and end NOBR tag,
while WBR is for the rare case when you want to specify where to
break the line if needed. Should HTML 3.0 provide an equivalent
mechanism to WBR, (either a tag or an entity)?--
Note: Do not use empty paragraphs to add white space around
headings, lists or other elements. White space is added by the
rendering software.
Permitted Attributes
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
Dave Raggett Page 33
HTML 3.0 28th March 1995
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. For instance, <P CLASS=abstract> defines a
paragraph that acts as an abstract. By convention, the class
names are interpreted hierarchically, with the most general
class on the left and the most specific on the right, where
classes are separated by a period. The CLASS attribute is most
commonly used to attach a different style to some element, but
it is recommended that where practical class names should be
picked on the basis of the element's semantics, as this will
permit other uses, such as restricting search through documents
by matching on element class names. The conventions for choosing
class names are outside the scope of this specification.
ALIGN
Paragraphs are usually rendered flush left. The ALIGN attribute
can be used to explicitly specify the horizontal alignment:
align=left
The paragraph is rendered flush left (the default).
align=center
The paragraph is centered.
align=right
The paragraph is rendered flush right.
align=justify
Text lines are justified where practical, otherwise this
gives the same effect as the default align=left setting.
For example:
<p align=center>This is a centered paragraph.
<p align=right>and this is a flush right paragraph.
CLEAR
This attribute is common to all block-like elements. When text
flows around a figure or table in the margin, you sometimes want
to start an element like a header, paragraph or list below the
figure rather than alongside it. The CLEAR attribute allows you
to move down unconditionally:
Dave Raggett Page 34
HTML 3.0 28th March 1995
clear=left
move down until left margin is clear
clear=right
move down until right margin is clear
clear=all
move down until both margins are clear
Alternatively, you can decide to place the element alongside the
figure just so long as there is enough room. The minimum width
needed is specified as:
clear="40 en"
move down until there is at least 40 en units free
clear="100 pixels"
move down until there is at least 100 pixels free
The style sheet (or browser defaults) may provide default
minimum widths for each class of block-like elements.
NOWRAP
The NOWRAP attribute is used when you don't want the browser to
automatically wrap lines. You can then explicitly specify line
breaks in paragraphs using the BR element. For example:
<p nowrap>This paragraph has wordwrap turned off<br>
and the BR element is used for explicit line breaks
Dave Raggett Page 35
HTML 3.0 28th March 1995
Line Breaks
Permitted Context: %text
Content Model: Empty!
Line break and tab elements can be used when you need a little more
control over how the browser renders the text. The <BR> element is
used to force a line break.
For example:
This is the first line<br>
and this is the second<br>
and this the third
--Shouldn't we have a conditional line break element like Netscape's
WBR thats indicates where to break lines when needed and when
wordwrap is disabled? Rather than an element, shouldn't this be an
entity - is there one already defined for this purpose?--
Permitted Attributes
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
CLEAR
When text flows around a figure or table in the margin, you
sometimes want to start the next line below the figure rather
Dave Raggett Page 36
HTML 3.0 28th March 1995
than alongside it. The CLEAR attribute allows you to move down unconditionally:
clear=left
move down until left margin is clear
clear=right
move down until right margin is clear
clear=all
move down until both margins are clear
Alternatively, you can decide to place the element alongside the
figure just so long as there is enough room. The minimum width
needed is specified as:
clear="40 en"
move down until there is at least 40 en units free
clear="100 pixels"
move down until there is at least 100 pixels free
The style sheet (or browser defaults) may provide default
minimum widths for each class of block-like elements.
Dave Raggett Page 37
HTML 3.0 28th March 1995
Horizontal Tabs
Permitted Context: %text
Content Model: Empty!
The TAB element can be used when you want fine control over the
horizontal positioning. The TAB element is used with the <tab
id=--name--> attribute to define named tab stops. Subsequently, you
can use the TAB element with the <tab to=--name--> attribute to move
to the previously defined tab stop. This approach avoids the need to
know the font metrics in advance. The TAB element, together with
style sheets, allows conversion software to preserve layout
information when importing documents created with conventional word
processing software.
For example:
<p><b>noct<tab id=t1>ambulant</b> - walking at night<br>
<tab to=t1>(from Latin: <i>nox noctis</i> night + <i>ambulare</i> walk)
which is rendered as:
noctambulant - walking at night
(from Latin: --nox noctis-- night + --ambulare-- walk)
The tab stop name (--t1-- in the example) should be unique within
the current document and composed from an initial letter followed by
letters, digits or hyphens.
Sometimes, you want to make the remainder of the line flush right
while leaving the earlier words unmoved. This is possible with the
--align-- attribute. For example:
Left part of line<tab align=right>and right part of line.
which is rendered as:
Left part of line and right part of line.
Permitted Attributes
ID
An SGML identifier used to name a new tab stop at the current
position. The scope of the tab stop is the rest of the document.
INDENT
Specifies the number of en units before the tab stop. The en is
a typographical unit equal to half the point size. It allows
authors to control the leading indent before text, e.g. in
poetry, one might use: <TAB INDENT=6> to indent six en units at
the start of a line. The INDENT attribute is not meaningful when
combined with the TO attribute.
Dave Raggett Page 38
HTML 3.0 28th March 1995
TO
Specifies a previously defined tab stop (see ID attribute).
ALIGN
Lines are usually rendered according to the alignment option for
the enclosing paragraph element. The ALIGN attribute can be used
to explicitly specify the horizontal alignment:
align=left
Following text starts immediately after the designated tab
stop (the default).
align=center
Following text up to next tab or line break is centered on
the designated tab stop. If the TO attribute is missing, it
centers the text between the current left and right margins.
align=right
Following text up to the next tab or line break is rendered
flush right to the designated tab stop. If the TO attribute
is missing, it renders the text flush right against the
current right margin.
align=decimal
The following text is searched for the first occurrence of
the character representing the decimal point. The text up to
the next tab or line break is then aligned such that the
decimal point starts at the designated tab stop. If the TO
attribute is missing, the tab element is treated as a single
space character.
DP
This specifies the character to be used for the decimal point
with the ALIGN attribute, e.g. dp="." (the default) or dp=",".
The default may be altered by the language context, as set by
the LANG attribute on enclosing elements.
Note: if the specified alignment and tab stop would cause text to
overlap preceding text, then the tab element may be treated as a
single space character.
--How should the above be rewritten to work with languages which are
rendered from right to left? What about lines with mixed
directions?--
Dave Raggett Page 39
HTML 3.0 28th March 1995
Hypertext Links
Permitted Context: %text
Content Model: %text, but no nested anchors
The anchor <A> element is used to define the start and/or
destination of a hypertext link. In previous versions of HTML it
provided the only means for defining destination anchors within
documents, but you can now use any ID attribute as a destination
anchor so that links can now be made to divisions, paragraphs and
most other elements.
Example:
The <A HREF="http://www.w3.org/">World Wide Web Organization</A>
provides information on Web related standards, mailing lists
and freeware tools.
The text between the start and end tag defines the label for the
link. Selecting the link takes the reader to the document specified
by the HREF attribute, in this case, the W3O home page. The label
can include graphics defined with IMG elements.
For FIG elements, the anchor element serves a dual role.
Non-graphical user agents interpret it as a conventional text-based
hypertext link, while graphical user agents interpret the anchor's
SHAPE attribute as a graphical hotzone on the figure.
Permitted Attributes
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document. This attribute supercedes the "NAME"
attribute, see below.
For example, the following paragraph is defined as an anchor
named "potomac":
<P ID="potomac">The Potomac river flows into Boston harbour,
and played an important role in opening up the hinterland
to early settlers...
Elsewhere, you can define a link to this paragraph, as follows:
<A HREF="#potomac">Boston</A> is a historic city and
a thriving center of commerce and higher education.
The reader can select the link labelled "Boston" to see further
information on the Boston area.
LANG
Dave Raggett Page 40
HTML 3.0 28th March 1995
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
HREF
The HREF attribute implies that the anchor acts as the start of
a hypertext link. The destination is designated by the value of
the HREF attribute, which is expressed in the Universal Resource
Identifier (URI) notation.
MD
Specifies a message digest or cryptographic checksum for the
linked document designated by the HREF attribute. It is used
when you want to be sure that a linked object is indeed the same
one that the author intended, and hasn't been modified in any
way. For instance, MD="md5:jV2OfH+nnXHU8bnkPAad/mSQlTDZ", which
specifies an MD5 checksum encoded as a base64 character string.
The MD attribute is generally allowed for all elements which
support URI based links.
NAME
This attribute is used to define a named anchor for use as the
destination of hypertext links. For example, the following
defines an anchor than can be used as the destination of a jump
into a description of the Boston area.
The <A NAME="potomac">Potomac river</A> flows into Boston
harbour.
Note: the NAME attribute has been superceded by the ID
attribute. User agents should include support for NAME to ensure
backwards compatibility with legacy documents produced using
previous versions of HTML.
SHAPE
This attribute is used within figures to define shaped hotzones
Dave Raggett Page 41
HTML 3.0 28th March 1995
for graphical hypertext links. Full details of how to use this
feature will be given with the description of the figure
element. The attribute value is a string taking one of the
following forms:
"default"
Used to define a default link for the figure background.
"circle x, y, r"
Where x and y define the center and r specifies the radius.
"rect x, y, w, h"
Where x, y define the upper left corner and w, h define the
width and height respectively
"polygon x1, y1, x2, y2, ..."
Given n pairs of x, y coordinates, the polygon is closed by
a line linking the n'th point to the first. Intersecting
polygons use the non-zero winding number rule to determine
if a point lies inside the polygon.
If a pointer event occurs in a region where two or more shapes
overlap, the distance from the point to the center of gravity of
each of the overlapping shapes is computed and the closest one
chosen. This feature is useful when you want lots of closely
spaced hotzones, for example over points on a map, as it allows
you to use simple shapes without worrying about overlaps.
Note: The x coordinate increases to the right, and the y
coordinate increases downwards in the same way as IMG and image
maps. If both numbers are integers, the coordinates are
interpreted as pixel offsets from the upper left corner of the
figure. Otherwise, the coordinates are interpreted as scaled
values in the range 0.0 to 1.0 across the figure. Note the
syntax is tolerant of repeated white space characters between
tokens.
TITLE
This is informational only and describes the object specified
with the HREF attribute. It can be used for object types that
don't possess titles, such as graphics, plain text and Gopher
menus.
REL
Used to describe the relationship of the linked object specified
with the HREF attribute. The set of relationship names is not
part of this specification, although "Path" and "Node" are
reserved for future use with hypertext paths or guided tours.
The REL attribute can be used to support search for links
serving particular relationships.
Dave Raggett Page 42
HTML 3.0 28th March 1995
REV
This defines a reverse relationship. A link from document A to
document B with REV=--relation-- expresses the same relationship
as a link from B to A with REL=--relation--. REV=made is
sometimes used to identify the document author, either the
author's email address with a --mailto-- URI, or a link to the
author's home page. Tables of contents can use anchors with
REV="ToC" to allow software to insert page numbers when printing
hypertext documents. The plain text version of this
specification was generated in this way!
Dave Raggett Page 43
HTML 3.0 28th March 1995
Overview of Character-Level Elements
Permitted Context: %text
Content Model: %text
Character level elements are used to specify either the structural
meaning or the physical appearence of marked text without causing a
paragraph break. Like most other elements, character level elements
include both start and end tags. Only the characters between the
tags are effected. For example:
This is <EM>emphasized</EM> text.
Highlighting elements are allowed within the content of other
highlighting elements, but implementations are not required to
render these nested highlighting elements distinctly from non-nested
elements. For example, implementations may render the following two
cases identically:
plain <B>bold <I>italic</I></B>
plain <B>bold </B><I>italic</I>
Some character highlighting styles are more explicit than others
about how they should be physically represented. Designate the
information type rather than the character format wherever possible,
unless for example, it is necessary to refer to the text as in "The
italic parts are mandatory".
Permitted Attributes
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
Dave Raggett Page 44
HTML 3.0 28th March 1995
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
Dave Raggett Page 45
HTML 3.0 28th March 1995
Information Type Elements
EM
The <EM> element provides typographic emphasis, typically
italics. While <EM> and <I> often give the same effect, use <EM>
except where it is necessary in the text to refer to the
formatting, as in "The italic parts are mandatory". This will
help to ensure consistency between documents from various
sources if (for example) the reader prefers to use color in
place of italics for emphasis.
CITE
The <CITE> element specifies a citation. Sections tagged with
the CITE element are typically rendered in italics.
STRONG
The <STRONG> element provides strong typographic emphasis,
typically bold.
CODE
The <CODE> element indicates an example of code; typically
rendered in a mono-spaced font. Do not confuse with PRE.
SAMP
The <SAMP> element indicates a sequence of literal characters.
KBD
The <KBD> element indicates text typed (keyboarded) by the user.
It might typically be used in an instruction manual.
VAR
The <VAR> element indicates a variable name, and might typically
be used in an instruction manual.
DFN
The <DFN> element indicates the defining instance of a term.
--New in 3.0--.
Q
The <Q> element is used for a short quotation. It is typically
shown enclosed in quotation marks as appropriate to the language
context. For English these would be matching double or single
quotation marks, alternating for nested quotes. The language
context is set by the LANG attribute. --New in 3.0--.
LANG
The <LANG> element is used to alter the language context when it
is inappropriate to do this with other character-level elements.
--New in 3.0--.
AU
The <AU> element indicates the name of an author. --New in
3.0--.
Dave Raggett Page 46
HTML 3.0 28th March 1995
PERSON
The <PERSON> element is used for names of people to allow these
to be extracted automatically by indexing programs. --New in
3.0--.
ACRONYM
The <ACRONYM> element is used to markup acronyms. --New in
3.0--.
ABBREV
The <ABBREV> element is used to markup abbreviations. --New in
3.0--.
INS
The <INS> element is used for inserted text, for instance in
legal documents. --New in 3.0--.
DEL
The <DEL> is used for deleted text, for instance in legal
documents. --New in 3.0--.
An example:
This text contains an <em>emphasized</em> word.
<strong>Don't assume</strong> that it will be italic!
It was made with the <code>EM</code> element. A cite is
often italic and has no formally required structure:
<cite>Moby Dick</cite> is a book title.
Dave Raggett Page 47
HTML 3.0 28th March 1995
Font Style Elements
These elements may be nested within one another. Browsers should,
where practical, aim to combine different types of highlighting as
required.
B (Boldface)
The <B> element specifies that the enclosed text should be
displayed in a boldface. If this is not practical, an
alternative mapping is allowed.
I (Italic)
The <I> element specifies that the enclosed text should be
displayed, if practical, in an italic font (or slanted).
TT (TeleType)
The <TT> element specifies that the enclosed text should be
displayed, if practical, in a fixed-pitch typewriter font.
U (Underline)
The <U> element specifies that the enclosed text should be
displayed, if practical, as underlined. --Not widely supported--
S (Strike through)
The <S> element specifies that the enclosed text should be
displayed with a horizontal line striking through the text. If
this is not practical, an alternative mapping is allowed. --New
in 3.0--.
BIG (Big print)
The <BIG> element specifies that the enclosed text should be
displayed, if practical, using a big font (compared with the
current font). --New in 3.0--.
SMALL (Small print)
The <SMALL> element specifies that the enclosed text should be
displayed, if practical, using a small font (compared with
normal text). --New in 3.0--.
SUB (Subscript)
The <SUB> element specifies that the enclosed text should be
displayed as a subscript, and if practical, using a smaller font
(compared with normal text). The ALIGN attribute for SUB is only
meaningful within the MATH element. --New in 3.0--.
SUP (Superscript)
The <SUP> element specifies that the enclosed text should be
displayed as a superscript, and if practical, using a smaller
font (compared with normal text). The ALIGN attribute for SUP is
only applicable within the MATH element. --New in 3.0--.
An example:
Dave Raggett Page 48
HTML 3.0 28th March 1995
This text contains some <b><i>bold italic</i></b> text, some
<S>struck through</S> text and some <SMALL>small print</SMALL>.
Dave Raggett Page 49
HTML 3.0 28th March 1995
The IMG (Image) Element
Permitted Context: %text
Content Model: Empty!
The <IMG> tag is used to incorporate in-line graphics (typically
icons or small graphics) into an HTML document. This element is NOT
intended for embedding other HTML text. For large figures with
captions and text flow see FIG element.
Example:
<IMG SRC="tajmahal.gif" ALT="The Taj Mahal">
Browsers that cannot display in-line images ignore the IMG element
unless it contains the ALT attribute. Note that some browsers can
display (or print) linked graphics but not in-line graphics. If the
graphic is essential, you may want to create a link to it rather
than to put it in-line. If the graphic is essentially decorative,
then IMG is appropriate.
Permitted Attributes
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
SRC (Source)
The SRC attribute specifies the URI for the image to be
Dave Raggett Page 50
HTML 3.0 28th March 1995
embedded. Its syntax is the same as that of the HREF attribute
of the <A> tag. SRC is mandatory.
MD
Specifies a message digest or cryptographic checksum for the
associated graphic specified by the SRC attribute. It is used
when you want to be sure that the image is indeed the same one
that the author intended, and hasn't been modified in any way.
For instance, MD="md5:jV2OfH+nnXHU8bnkPAad/mSQlTDZ", which
specifies an MD5 checksum encoded as a base64 character string.
The MD attribute is generally allowed for all elements which
support URI based links.
WIDTH
Optional suggested width for the image. By default, this is
given in pixels.
HEIGHT
Optional suggested height for the image. By default, this is
given in pixels.
UNITS
This optional attribute specifies the units for the width and
height attributes. It is one of: units=pixels (the default) or
units=en (half the point size).
ALIGN
Take values TOP or MIDDLE or BOTTOM, defining whether the top or
middle or bottom of the graphic should be aligned with the
baseline for the text line in which the IMG element appears.
With ALIGN=LEFT, the graphic will float down and over to the
current left margin, and subsequent text will wrap around the
right hand side of the graphic. Likewise for ALIGN=RIGHT, the
graphic aligns with the current right margin and, and text wraps
around the left. It is inappropriate to use this feature for
larger graphics as these are best represented with the FIG
element.
ALT (Alternate text)
Optional alternative text as an alternative to the graphics for
display in text-only environments. The alt text can contain
entities e.g. for accented characters or special symbols, but it
can't contain markup. The latter is possible, however, with the
FIG element.
ISMAP
An image map is a graphical map by which users can navigate
transparently from one information resource to another. The
ISMAP attribute identifies an image as an image map. The IMG
element can then be used as part of the label for a hypertext
link (see the anchor element). When the user clicks on the image
the location clicked is sent to the server designated by the
Dave Raggett Page 51
HTML 3.0 28th March 1995
hypertext link.
For example:
<A HREF="http://machine/htbin/imagemap/sample">
<IMG SRC="sample.gif" ISMAP></A>
Note: There are drawbacks from having the server process clicks on
images: the delay in getting feedback and the inability to change
the pointer cursor on the fly as it moves over hotzones. Client-side
processing of events is possible if one of the following applies:
* The server may allow the image map to be downloaded and
processed locally. This should work with legacy documents
produced using earlier versions of HTML.
* Using an image format that includes image hotzones as part of
the file format.
* The FIG element provides for client-side image maps as a unified
part of the figure description. It offers a number of advantages
over IMG, including captions, markup in alt text and text flow
around figures.
Dave Raggett Page 52
HTML 3.0 28th March 1995
UL (Unordered List)
Permitted Context: %Body.Content, %flow, %block
Content Model: Optional list header (LH), followed by one or more
list items(LI)
An unordered list typically is a bulleted list of items. HTML 3.0
gives you the ability to customise the bullets, to do without
bullets and to wrap list items horizontally or vertically for
multicolumn lists.
The opening list tag must be <UL>. It is followed by an optional
list header (<LH>caption</LH>) and then by the first list item
(<LI>). For example:
<UL>
<LH>Table Fruit</LH>
<LI>apples
<LI>oranges
<LI>bananas
</UL>
which could be rendered as:
Table Fruit
* apples
* oranges
* bananas
Note: Some legacy documents may include headers or plain text before
the first LI element. Implementors of HTML 3.0 user agents are
advised to cater for this possibility in order to handle badly
formed legacy documents.
MENU and DIR elements
These elements are superceded by extensions to the UL element. User
agents are advised to continue to support them for the sake of
legacy documents. Both MENU and DIR consist of one or more LI
elements, similar to UL. MENU lists are typically rendered without
bullets in a more compact style than UL. You can get the same effect
with <UL PLAIN>. DIR lists are used to present lists of items
containing up to 20 characters each. Items in a DIR list are
arranged in columns. You can get the same effect with <UL PLAIN
WRAP=HORIZ>.
Permitted Attributes for the UL Element
ID
An SGML identifier used as the target for hypertext links or for
Dave Raggett Page 53
HTML 3.0 28th March 1995
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
CLEAR
This attribute is common to all block-like elements. When text
flows around a figure or table in the margin, you sometimes want
to start an element like a header, paragraph or list below the
figure rather than alongside it. The CLEAR attribute allows you
to move down unconditionally:
clear=left
move down until left margin is clear
clear=right
move down until right margin is clear
clear=all
move down until both margins are clear
Alternatively, you can decide to place the element alongside the
figure just so long as there is enough room. The minimum width
needed is specified as:
clear="40 en"
move down until there is at least 40 en units free
Dave Raggett Page 54
HTML 3.0 28th March 1995
clear="100 pixels"
move down until there is at least 100 pixels free
The style sheet (or browser defaults) may provide default
minimum widths for each class of block-like elements.
PLAIN
The presence of this attribute suppresses the display of
bullets, e.g. <UL PLAIN>.
SRC
Specifies an image for use as a bullet. The image is specified
as a URI. This attribute may appear together with the MD
attribute.
MD
Specifies a message digest or cryptographic checksum for the
associated graphic specified by the SRC attribute. It is used
when you want to be sure that a linked object is indeed the same
one that the author intended, and hasn't been modified in any
way. For instance, MD="md5:jV2OfH+nnXHU8bnkPAad/mSQlTDZ", which
specifies an MD5 checksum encoded as a base64 character string.
The MD attribute is generally allowed for all elements which
support URI based links.
DINGBAT
Specifies an iconic image for use as a bullet. The icon is
specified as an entity name. A list of standard icon entity
names for HTML 3.0 is given in an appendix of this
specification, e.g. folder is the entity name for an icon
denoting a directory or folder.
WRAP
The WRAP attribute is used for multicolumn lists. Use wrap=vert
if you want to arrange the list items down the page before
wrapping to the next column. Use wrap=horiz if you want to
arrange the items across the page (less useful). The user agent
is responsible for determining how many columns are appropriate.
COMPACT
The presence of this attribute indicates the user agent should
use reduced interitem spacing. In practice, there are several
ways to increase the compactness of lists: reduced vertical
interitem spacing, smaller font size, or even to avoid line
breaks between items. This is best handled through associated
style sheets and the class attribute.
Dave Raggett Page 55
HTML 3.0 28th March 1995
LH (List Header)
Permitted Context: Immediately following UL, OL or DL
Content Model: %text
The LH or list header element is used to provide a title for a list.
User agents can use this in place of the full list when a mechanism
is provided to fold and unfold nested lists.
Permitted Attributes for the LH Element
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
Dave Raggett Page 56
HTML 3.0 28th March 1995
LI (List Item)
Permitted Context: UL or OL
Content Model: %flow
The LI or list item element is used for items in both ordered and
unordered lists.
Note: The content model for list items is quite broad, including
paragraphs, lists, performatted text, forms, tables, figures and
admonishments. Headers are not permitted, although implementors of
HTML 3.0 user agents are advised to cater for this possibility in
order to handle badly formed legacy documents. If %html.recommended
is active, the HTML 3.0 DTD expects you to enclose plain text in a
block element such as <P>
Permitted Attributes for the LI Element
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
CLEAR
This attribute is common to all block-like elements. When text
flows around a figure or table in the margin, you sometimes want
to start the list item below the figure rather than alongside
it. The CLEAR attribute allows you to move down unconditionally:
Dave Raggett Page 57
HTML 3.0 28th March 1995
clear=left
move down until left margin is clear
clear=right
move down until right margin is clear
clear=all
move down until both margins are clear
Alternatively, you can decide to place the element alongside the
figure just so long as there is enough room. The minimum width
needed is specified as:
clear="40 en"
move down until there is at least 40 en units free
clear="100 pixels"
move down until there is at least 100 pixels free
The style sheet (or browser defaults) may provide default
minimum widths for each class of block-like elements.
SRC
Specifies an image for use as a bullet. The image is specified
as a URI. This attribute may appear together with the MD
attribute.
MD
Specifies a message digest or cryptographic checksum for the
associated graphic specified by the SRC attribute. It is used
when you want to be sure that a linked object is indeed the same
one that the author intended, and hasn't been modified in any
way. For instance, MD="md5:jV2OfH+nnXHU8bnkPAad/mSQlTDZ", which
specifies an MD5 checksum encoded as a base64 character string.
The MD attribute is generally allowed for all elements which
support URI based links.
DINGBAT
Specifies an iconic image for use as a bullet. The icon is
specified as an entity name. A list of standard icon entity
names for HTML 3.0 is given in an appendix of this
specification, e.g. folder is the entity name for an icon
denoting a directory or folder.
SKIP
Increments the sequence number before rendering the element. It
is used when headers have been left out of the sequence. For
instance, SKIP=3 advances the sequence number past 3 omitted
items.
Dave Raggett Page 58
HTML 3.0 28th March 1995
OL (Ordered List)
Permitted Context: %Body.Content, %flow, %block
Content Model: Optional list header (LH), followed by one or more
list items(LI)
An ordered list typically is a numbered list of items. HTML 3.0
gives you the ability to control the sequence number - to continue
where the previous list left off, or to start at a particular
number. The numbering style is left to associated style sheets, e.g.
whether nested lists contribute to a compound item number, e.g.
"3.1.5", or whether numbers are rendered as arabic, upper or lower
case roman numerals or using the numbering scheme appropriate to the
language context.
The opening list tag must be <OL>. It is followed by an optional
list header (<LH>caption</LH>) and then by the first list item
(<LI>). For example:
<OL>
<LH>Meeting Agenda</LH>
<LI>Minutes of the last meeting
<LI>Do we need yet more meetings?
<LI>Any other business
</OL>
which could be rendered as:
Meeting Agenda
1. Minutes of the last meeting
2. Do we need yet more meetings?
3. Any other business
Note: Some legacy documents may include headers or plain text before
the first LI element. Implementors of HTML 3.0 user agents are
advised to cater for this possibility in order to handle badly
formed legacy documents.
Permitted Attributes for the OL Element
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
Dave Raggett Page 59
HTML 3.0 28th March 1995
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
CLEAR
This attribute is common to all block-like elements. When text
flows around a figure or table in the margin, you sometimes want
to start an element like a header, paragraph or list below the
figure rather than alongside it. The CLEAR attribute allows you
to move down unconditionally:
clear=left
move down until left margin is clear
clear=right
move down until right margin is clear
clear=all
move down until both margins are clear
Alternatively, you can decide to place the element alongside the
figure just so long as there is enough room. The minimum width
needed is specified as:
clear="40 en"
move down until there is at least 40 en units free
clear="100 pixels"
move down until there is at least 100 pixels free
The style sheet (or browser defaults) may provide default
minimum widths for each class of block-like elements.
CONTINUE
Don't restart the sequence number, i.e. continue where previous
Dave Raggett Page 60
HTML 3.0 28th March 1995
list left off, e.g. <OL CONTINUE>
SEQNUM
Set the starting sequence number for the first item, e.g. <OL
SEQNUM=23>
COMPACT
The presence of this attribute indicates the user agent should
use reduced interitem spacing. In practice, there are several
ways to increase the compactness of lists: reduced vertical
interitem spacing, smaller font size, or even to avoid line
breaks between items. This is best handled through associated
style sheets and the class attribute.
Dave Raggett Page 61
HTML 3.0 28th March 1995
DL - Definition Lists
Permitted Context: %Body.Content, %flow, %block
Content Model: Optional list header(LH), followed by one or more
terms(DT) and definitions(DD).
A definition list is a list of terms and corresponding definitions.
Definition lists are typically formatted with the term on the left
with the definition following on the right or on the next line. The
definition text is typically indented with respect to the term.
An alternative format places the term left aligned in a wide margin
and the definition on one or more lines to the right of the term. If
the DT term does not fit in the DT column (one third of the display
area), it may be extended across the page with the DD section moved
to the next line, or it may be wrapped onto successive lines of the
left hand column.
The opening list tag must be <DL>. It is followed by an optional
list header (<LH>caption</LH>) and then by term names (<DT>) and
definitions (<DD>). For example:
<DL>
<LH>List Header</LH>
<DT>Term 1<dd>This is the definition of the first term.
<DT>Term 2<dd>This is the definition of the second term.
</DL>
which could be rendered as:
List Header
Term 1
This is the definition of the first term.
Term 2
This is the definition of the second term.
The definition list element can take the COMPACT attribute, which
suggests that a compact rendering be used, and is appropriate if the
list elements are small and/or the entire list is large.
Note: Use the NOTE element when you want to have an indented note.
The practice of using <DD> elements without corresponding <DT>
elements is deprecated.
Permitted Attributes for the DL Element
ID
An SGML identifier used as the target for hypertext links or for
naming particular elements in associated style sheets.
Identifiers are NAME tokens and must be unique within the scope
of the current document.
Dave Raggett Page 62
HTML 3.0 28th March 1995
LANG
This is one of the ISO standard language abbreviations, e.g.
"en.uk" for the variation of English spoken in the United
Kingdom. It can be used by parsers to select language specific
choices for quotation marks, ligatures and hypenation rules etc.
The language attribute is composed from the two letter language
code from ISO 639, optionally followed by a period and a two
letter country code from ISO 3166.
CLASS
This a space separated list of SGML NAME tokens and is used to
subclass tag names. By convention, the class names are
interpreted hierarchically, with the most general class on the
left and the most specific on the right, where classes are
separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is
recommended that where practical class names should be picked on
the basis of the element's semantics, as this will permit other
uses, such as restricting search through documents by matching
on element class names. The conventions for choosing class names
are outside the scope of this specification.
CLEAR
This attribute is common to all block-like elements. When text
flows around a figure or table in the margin, you sometimes want
to start an element like a header, paragraph or list below the
figure rather than alongside it. The CLEAR attribute allows you
to move down unconditionally:
clear=left
move down until left margin is clear
clear=right
move down until right margin is clear
clear=all
move down until both margins are clear
Alternatively, you can decide to place the element alongside the
figure just so long as there is enough room. The minimum width
needed is specified as:
clear="40 en"
move down until there is at least 40 en units free
clear="100 pixels"
move down until there is at least 100 pixels free
Dave Raggett Page 63
HTML 3.0 28th March 1995
The style sheet (or browser defaults) may provide default
minimum widths for each class of block-like elements.
COMPACT
The presence of this attribute indicates the user agent should
use reduced interitem spacing. The COMPACT attribute may also
reduce the width of the left-hand (DT) column.
In practice, there are several ways to increase the compactness
of lists: reduced vertical interitem spacing, smaller font size,
or even to avoid line breaks between items. This is best handled
through associated style sheets and the class attribute.
The opening list tag must be DL COMPACT. It must be immediately
followed by the first term (DT). For example:
<DL compact>
<DT>Term<DD>This is the first definition in compact format.
<DT>Term<