|
|||||||||
|
Getting started quicklyIt 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> The X version of Mosaic displays this as:
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 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:
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: Structure of documents Up: The Hypertext Markup Previous: Overview of HTML
Spinning the Web by Andrew Ford |
||||||
Copyright © 1996-2002 Ford & Mason Ltd |