Ford & Mason Ltd
HOME
ABOUT
CONTACT
RESOURCES
ADVERTISING



donations support the development of
cronolog.org
and
refcards.com

next up previous contents index
Next: Structure of documents Up: The Hypertext Markup Previous: Overview of HTML


Getting started quickly

It is useful to know how Web documents are structured, even though there are editors available that will let you create Web documents without such knowledge. HTML documents consist of plain text interspersed with markup directives, called tags. Tags are instructions to the browser software on how to display the text, and are represented by strings enclosed in angle brackets, for example <TITLE>. The following example shows what the source for a simple HTML document looks like:

    <TITLE>An English country garden</TITLE>

<H1>An English country garden</H1>

The garden at Hidcote Manor could be said to combine the maximum formality of design with the minimum formality of planting. It is devised as an interconnected series of outdoor rooms, enclosed by walls or hedges, each with a distinct theme, and each affording a tantalizing glimpse of the next, just sufficient to lead you on to explore further.

<P> In places the garden opens out to frame a far-reaching view of the surrounding Cotswold hills. Elsewhere the atmosphere is intimate, as in the cottage garden where four rather dumpy topiary birds, cut from box plants, face each other in a cosy circle.

The X version of Mosaic displays this as:

[simple document displayed]

Tag names are not case sensitive, so <TITLE> can be written <title> or even <Title> or <TiTLe>. Some people consider that it is easier to distinguish the tags from the text if they are written in upper case, but this is really unimportant.

To create a new paragraph in HTML you must specify a <P> tag.If you leave a blank line, browsers will ignore it. Carriage returns and blank lines are treated as a single space in HTML.

Conceptually, an HTML document consists of two parts: the head and the body. The head contains information about the document, and the body consists of the document contents. The body of the document shown in Figure gif consists of a heading (contained between the <H1> and </H1> tags), followed by two paragraphs. The <P> tag for the first paragraph is omitted as its presence can be implied.

You can convert existing documents into HTML in the following way:

  • If the document is stored on a word processor, save it as a plain text file.

  • At the top of the document add the lines:
        <HTML>
          <HEAD>
            <TITLE>Document Title</TITLE>
          </HEAD>
          <BODY>
    

    replacing the literal string Document Title between the <TITLE> and </TITLE> tags with your document's title.  

  • Put a </BODY> tag after the last line of the text.

  • Find each heading in the text and put a start heading tag at the beginning of the line and an end heading tag at the end of the line. There are six levels of heading, from <H1> to <H6>, where <H1> is the highest level.

  • Put a <P> tag at the start of each paragraph in the text.

This will leave you with a document with headings and broken into paragraphs. You may want to add other features, such as emphasis or links, described later in this chapter.

A fast way to learn HTML is to look at the source of existing Web documents, particularly those you consider well put together. Most browsers have an option, View Source, which will pop up a window containing the raw HTML.


next up previous contents index
Next: Structure of documents Up: The Hypertext Markup Previous: Overview of HTML

[ITCP]Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout using the Template Toolkit. The document is mainly of historical interest as obviously many of the sites mentioned have long since disappeared.

 
Copyright © 1996-2002 Ford & Mason Ltd