This is a paragraph.
Some elements appear as just a start tag. For example, to create a
line break, you use 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:
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:
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:
TheChieftain product range is the white hot hope for the
coming year. This report sets out how to position Chieftain
against competing products.
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:
Here is the text of the first paragraph. and this is
the text of the second paragraph.
The text up to the next element is treated as being part of the
current paragraph. This is an example of how SGML allows certain end
tags like 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:
This is a centered paragraph.
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:
This paragraph has wordwrap turned off noct 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:
Boston 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 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 emphasized 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 bold italic
plain bold italic
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 element provides typographic emphasis, typically
italics. While and often give the same effect, use
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 element specifies a citation. Sections tagged with
the CITE element are typically rendered in italics.
STRONG
The element provides strong typographic emphasis,
typically bold.
CODE
The
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
. 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, ; 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:
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:
To put quotes inside of quotes, you can use single quotes if the
outer quotes are double or vice versa, as in:
Dave Raggett Page 11
HTML 3.0 28th March 1995
Alternatively, you use the character representation " as in:
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:
can be written as:
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 . 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
This is a Heading
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 This is a top level heading
Here is some text.
Second level heading
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
element to force
line breaks where desired.
--Netscape includes two tags: 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:
This is a centered heading
Here is some text. and this is a flush right
heading
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:
This heading has wordwrap turned off
Dave Raggett Page 32
HTML 3.0 28th March 1995
Paragraphs
Permitted Context: %Body.Content, %flow, %block
Content Model: %text
The
and the BR element is used for explicit line breaksThe heading precedes the first paragraph
element to force
line breaks where desired.
--Netscape includes two tags:
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
element is
used to force a line break.
For example:
This is the first line
and this is the second
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
element indicates an example of code; typically
rendered in a mono-spaced font. Do not confuse with PRE.
SAMP
The element indicates a sequence of literal characters.
KBD
The element indicates text typed (keyboarded) by the user.
It might typically be used in an instruction manual.
VAR
The element indicates a variable name, and might typically
be used in an instruction manual.
DFN
The element indicates the defining instance of a term.
--New in 3.0--.
Q
The 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
is used for deleted text, for instance in legal
documents. --New in 3.0--.
An example:
This text contains an emphasized word.
Don't assume that it will be italic!
It was made with the EM element. A cite is
often italic and has no formally required structure:
Moby Dick 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 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 element specifies that the enclosed text should be
displayed, if practical, in an italic font (or slanted).
TT (TeleType)
The element specifies that the enclosed text should be
displayed, if practical, in a fixed-pitch typewriter font.
U (Underline)
The element specifies that the enclosed text should be
displayed, if practical, as underlined. --Not widely supported--
S (Strike through)
The 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 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 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 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 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 bold italic text, some
struck through text and some small print.
Dave Raggett Page 49
HTML 3.0 28th March 1995
The IMG (Image) Element
Permitted Context: %text
Content Model: Empty!
The 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:
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 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:
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 . It is followed by an optional
list header (
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 . 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
.
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.
.
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
. It is followed by an optional
list header (
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.
SEQNUM
Set the starting sequence number for the first item, e.g.
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
. It is followed by an optional
list header (
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