[Next] [Previous] [Up] [Top]

1. Overview of HTML Specification

1.1 HTML Elements

1.1.1 - Document Structure Elements
1.1.2 - Anchor Element
1.1.3 - Block Formatting Elements
1.1.4 - List Elements
1.1.5 - Information Type and Character Formatting Elements
1.1.6 - Image Element
1.1.7 - Form Elements
1.1.8 - Character Data in HTML


1.1.1 Document Structure Elements

HTML Identifier

<HTML> ... </HTML>

The HTML identifier defines the document as containing HTML elements. It contains only the Head and Body elements.

Head

<HEAD> ... </HEAD>

The Head element contains HTML elements that describe the documents title, usage and relationship with other documents.

Body

<BODY> ... </BODY>

The Body element contains the text and its associated HTML elements of the document.

Example of Document Structure Elements

<HTML>
<HEAD>
<TITLE>The Document's Title</TITLE>
</HEAD>
<BODY>
The document's text.
</BODY>

1.1.2 Anchor Element

Anchor

<A> ... </A>

An anchor specifies a link to another location (<A HREF>) or the value to use when linking to this location from another location (<A NAME>):

See <A HREF="http://www.hal.com/">HaL</A>'s
information for more details.

<A NAME="B">Section B</A> describes...
...
See <A HREF="#B">Section B</A> for more information.

1.1.3 Block Formatting Elements

Address

<ADDRESS> ... </ADDRESS>

<ADDRESS>
Newsletter editor<BR>
J.R. Brown<BR>
JimquickPost News, Jumquick, CT 01234<BR>
Tel (123) 456 7890
</ADDRESS>

Body

<BODY> ... </BODY>

Place the <BODY> and </BODY> tags above and below the body of the text (not including the head) of your HTML document.

Blockquote

<BLOCKQUOTE>... </BLOCKQUOTE>

I think it ends
<BLOCKQUOTE>
<P>Soft you now, the fair Ophelia. Nymph, in thy orisons,
be all my
sins remembered.
</BLOCKQUOTE>
but I am not sure.

Head

<HEAD> ... </HEAD>

Every HTML document must have a head, which provides a title. Example:

<HTML>
<HEAD>
<TITLE>Introduction to HTML</TITLE>
</HEAD>

Headings

<H1>This is a first level heading</H1>
<P>There are six levels of headings.
<H2>Second level heading</H2>
<P>This text appears under the second level heading

Horizontal Rule

<HR>

Inserts a horizontal rule that spans the width of the document. Example:

<HR>
<ADDRESS>, CERN</ADDRESS>
</BODY>

HTML Identifier

<HTML> ... </HTML>

An HTML document begins with an <HTML> tag and ends with the </HTML> tag.

Line Break

<BR>

Forces a line break:

Name<BR>
Street address<BR>
City, State Zip

Paragraph

<P> ... </P>

<H1>This Heading Precedes the Paragraph</H1>
<P>This is the text of the first paragraph.
<P>This is the text of the second paragraph. Although you do not need to start
paragraphs on new lines, maintaining this convention facilitates document
maintenance.
<P>This is the text of a third paragraph.

Preformatted Text

<PRE> ... </PRE>

<PRE WIDTH="80">
This is an example of preformatted text.
</PRE>

Title

<TITLE> ... </TITLE>

<TITLE>Title of document</TITLE>

1.1.4 List Elements

Definition List

<DL> ... <DT>term<DD>definition... </DL>

<DL>
<DT>Term<DD>This is the first definition.
<DT>Term<DD>This is the second definition.
</DL>

Directory List

<DIR> ... <LI>List item... </DIR>

<DIR>
<LI>A-H<LI>I-M
<LI>M-R<LI>S-Z
</DIR>

Menu List

<MENU> ... <LI>List item... </MENU>

<MENU>
<LI>First item in the list.
<LI>Second item in the list.
<LI>Third item in the list.
</MENU>

Ordered List

<OL> ... <LI>List item... </OL>

<OL>
<LI>Click the Web button to open the Open the URL window.
<LI>Enter the URL number in the text field of the Open URL window. The Web document you specified is displayed.
<LI>Click highlighted text to move from one link to another.
</OL>

Unordered List

<UL> ... <LI>List item... </UL>

<UL>
<LI>This is the first item in the list.
<LI>This is the second item in the list.
<LI>This is the third item in the list.
</UL>

1.1.5 Information Type and Character Formatting Elements

Bold

<B> ... </B>

Suggests the rendering of the text in boldface. If boldface is not available, alternative mapping is allowed.

Citation

<CITE> ... </CITE>

Specifies a citation; typically rendered as italic.

Code

<CODE> ... </CODE>

Indicates an inline example of code; typically rendered as monospaced.. Do not confuse with the <PRE> tag.

Emphasis

<EM> ... </EM>

Provides typographic emphasis; typically rendered as italics.

Italics

<I> ... </I>

Suggests the rendering of text in italic font, or slanted if italic is not available.

Keyboard

<KBD> ... </KBD>

Indicates text typed by a user; typically rendered as monospaced.

Sample

<SAMP> ... </SAMP>

Indicates a sequence of literal characters; typically rendered as monospaced..

Strong

<STRONG> ... </STRONG>

Provides strong typographic emphasis; typically rendered as bold.

Typetype

<TT> ... </TT>

Specifies that the text be rendered in fixed-width font.

Variable

<VAR> ... </VAR>

Indicates a variable name; typically rendered as italic.


1.1.6 Image Element

Image

<IMG>

Inserts the referenced graphic image into the document at the location where the element occurs.

Example:

<IMG SRC ="triangle.gif" ALT="Warning:"> Be sure to read these instructions.

1.1.7 Form Elements

Form

<FORM> ... </FORM>

The Form element contains nested elements (described below) which define user input controls and allow descriptive text to be displayed when the document is processed.

Input

<INPUT>

Takes these attributes: ALIGN, MAXLENGTH, NAME, SIZE, SRC, TYPE, VALUE. The type attribute can define these field types: CHECKBOX, HIDDEN, IMAGE, PASSWORD, RADIO, RESET, SUBMIT, TEXT.

For example:

<FORM METHOD="POST" action="http://www.hal.com/sample">
<P>Your name: <INPUT NAME="name" SIZE="48">
<P>Male <INPUT NAME="gender" TYPE=RADIO VALUE="male">
<P>Female <INPUT NAME="gender" TYPE=RADIO VALUE="female">
</FORM>

Option

<OPTION>

The Option element can only occur within a Select element. It represents one choice.

Select

<SELECT NAME="..." > ... </SELECT>

Select provides a list of choices.

<SELECT NAME="flavor">
<OPTION>Vanilla
<OPTION>Strawberry
<OPTION>Rum and Raisin	
<OPTION>Peach and Orange
</SELECT>

Textarea

<TEXTAREA> ... </TEXTAREA>

Textarea defines a multi-line text entry input control. It contains the initial text contents of the control.

<TEXTAREA NAME="address" ROWS=64 COLS=6>
HaL Computer Systems
1314 Dell Avenue
Campbell California 95008
</TEXTAREA>

1.1.8 Character Data in HTML

Representing Graphic Characters in HTML

Because of the way special characters are used in marking up HTML text, character strings are used to represent the less than (<) and greater than (>) symbols and the ampersand (&) as shown in Section 2.17.1.

Representing ISO Latin-1 Characters in HTML

HTML also allows references to any of the ISO Latin-1 alphabet, using the names in the table ISO Latin-1 Character Representations, which is derived from ISO Standard 8879:1986//ENTITIES Added Latin 1//EN. For details, see 2.17.2.


HTML 2.0 Specification (Internet Draft) - 29 NOV 94
[Next] [Previous] [Up] [Top]

Generated with CERN WebMaker