HTML for dummies

-------------

Introduction

The following is intended as a very brief introduction to some features of WWW authoring using HTML. The list is far from complete, instead an attempt has been made to describe popular constructs that will work with a majority of available WWW browsers.

Press here to go back to the home page.

-------------

General

The contents of a HTML should be according to the following:

   
    <HTML>
    <HEAD>
    <TITLE>Title</TITLE>
    </HEAD>
    <BODY>
    Body
    </BODY>
    </HTML>
Title is the document title, and Body is the document content proper.

-------------

Headings

Headings are available in six levels 1..6. A level 2 heading, as used above, is written as:

    <H2>Heading</H2>
In modern browsers, the heading may be centered by:
    <H2 ALIGN=CENTER>Heading</H2>
Older browsers will simply ignore this request.

-------------

Paragraphs

Ordinary paragraphs, where text is filled to the actual page width, are introduced by:

    <P>
As for headings, a request for a centered paragraph can be given by:
    <P ALIGN=CENTER>
Line breaks may be forced by:
    <BR>

-------------

Anchor

To make a hypertext link to another document, specifying the local filename, or alternatively a full URL:

    <A HREF="URL"> Text </A>
To attach a "label" at a specific point in a document, usable as a target for a link:
    <A NAME="label"> </A>

To make a hypertext link to a label in the current document:

    <A HREF="#label"> Text </A>
To link to another document at a specific label:
    <A HREF="URL#label"> Text </A>

-------------

Character styles

Various character styles are available. Boldface is specified by:

    <B> Text </B>
Italics by:
    <I> Text </I>
Typewriter style by:
    <TT> Text </TT>
The styles may be nested.

-------------

Images

Inline images are specified by:

    <IMG SRC="Filename">
As for anchors, a local filename or a full URL may be specified. For compatibility with most browsers, the GIF file format should be used.

An inline image is treated more-or-less as a single character, and may for instance appear within a text stream.

For the convenience of those using text-only browsers, an alternative text message should be supplied:

    <IMG SRC="Filename" ALT="Text">

For an improvement in the time required to display a page, the image size should to be specified:

    <IMG SRC="Filename" WIDTH=W HEIGHT=H>
The numbers W and H should reflect the size in pixels.

-------------

Lists

Lists of items are done by:

    <UL>
    <LI> Item1
    <LI> Item2
    <LI> Item3
    </UL>
This becomes: To replace the bullet by a sequence number, specify an ordered lists by replacing UL by OL.

-------------

Preformatted text

Text that should be left undisturbed are indicated by:

    <PRE>
    Text
    </PRE>
To retain column alignment, a fixed typewriter font will be used.

-------------

Horizontal rule

A horizontal line spanning the full document width is specified by:

    <HR>

-------------

URL

A Universal Resource Locator specifies the name of an Internet resource, and is used in hypertext link and image specifications. A WWW document is specified as:

    http://hostname/path

-------------

Character set

Special character alternative syntax:

    &#n;
where n is:
     |0|1|2|3|4|5|6|7|8|9|
 30+ | | | |!|"|#|$|%|&|'|
 40+ |(|)|*|+|,|-|.|/|0|1|
 50+ |2|3|4|5|6|7|8|9|:|;|
 60+ |<|=|>|?|@|A|B|C|D|E|
 70+ |F|G|H|I|J|K|L|M|N|O|
 80+ |P|Q|R|S|T|U|V|W|X|Y|
 90+ |Z|[|\|]|^|_|`|a|b|c|
100+ |d|e|f|g|h|i|j|k|l|m|
110+ |n|o|p|q|r|s|t|u|v|w|
120+ |x|y|z|{|||}|~||
160+ | |¡|¢|£|¤|¥|¦|§|¨|©|
170+ |ª|«|¬|­|®|¯|°|±|²|³|
180+ |´|µ|¶|·|¸|¹|º|»|¼|½|
190+ |¾|¿|À|Á|Â|Ã|Ä|Å|Æ|Ç|
200+ |È|É|Ê|Ë|Ì|Í|Î|Ï|Ð|Ñ|
210+ |Ò|Ó|Ô|Õ|Ö|×|Ø|Ù|Ú|Û|
220+ |Ü|Ý|Þ|ß|à|á|â|ã|ä|å|
230+ |æ|ç|è|é|ê|ë|ì|í|î|ï|
240+ |ð|ñ|ò|ó|ô|õ|ö|÷|ø|ù|
250+ |ú|û|ü|ý|þ|ÿ|
     |0|1|2|3|4|5|6|7|8|9|

The character &#160; is the unpaddable blank space, suitable for adding extra blanks.

There are various mnemonic alternatives to the above. The support for these are pretty variable, the following are safe:

    &lt;      <
    &gt;      >
    &amp;     &
    &AElig;   Æ
    &Oslash;  Ø
    &Aring;   Å
    &aelig;   æ
    &oslash;  ø
    &aring;   å

-------------

Further reading


This page is being maintained by Egil Kvaleberg. Please send error reports, contributed material and suggestions to egil@kvaleberg.no.

Latest update: July 12th 2000