That is, no matter if two words are separated by a single space, five spaces and a tab, or three linefeeds, eight tabs, and two space; these are all seen as merely a word-break.
However, note that whitespace should be avoied after tags. E.g., this is bad form:
<P> Avant le XVIe siècle, le document
écrit
It should be:
<P>Avant le XVIe siècle, le document
écrit
This is because the first one, with whitespace after the P element, is often rendered by some browsers as being indented by one tiny single space. In the same way all of the following should be avoided:
<H2> L'orthographe jusqu'au XVIe siècle</H2>
Lorsque je parle du <i>graphème </i> et de
<A HREF="#algr"> l'allographe </a>, je...
To control formatting, we use these HTML elements, below. Use these elements for what they are for, and nothing else.
Mnemonic: Paragraph separation<P> is for paragraph breaks where they would not otherwise occur.
It is not for blank lines. Trying to use it for blank lines will work very differently across different browsers; don't do it.
Mnemonic: Heading<H1>text</H1> is for highest-level section heading. This will be rendered very differently on all browsers.
<H2>text</H2> is for second-highest-level section heading, and so on to <H6>text</H6>
These elements are there to reflect that an intelligently written document has an organization like an outline, at least at the level of a given page.
Use an <H2> element only after you've used an <H1> element, as is logical for an outline form.
You can use an ALIGN=center parameter in a heading element, like:
<H2 align=center>Hey, Cookiepuss!</H2>
And on some browsers this will center that heading. On ones
that it doesn't center it, it won't hurt anything.
Note:
<H1>Part 1</H1>
The discussion begins with...
In this piece of HTML code, the paragraph starting with "The"
won't be rendered on the same line with the heading "Part 1". So
no <P> is used, since a paragraph break is already implied in the
<H1>
<P> therefore means "a break between pieces of text that would otherwise run together". Don't use it where it's already implied (e.g., right after a section heading or after any structural element)
For more information, see the Strict Guide's section on Paragraph Break Errors.
Mnemonic: AnchorThe <A> element is what makes hypermedia what it is; it gives us links and anchors.
<A HREF="url">text</A>is how you link make "text" be a link to another resource. E.g.:
A <A HREF="me.gif">high-resolution picture</A> of myself is
available.
I've written a page outlining the format of
URLs. I think it's safe to say that most URLs end in .html
Now, to link to a point inside a document (as oppose to the whole document itself), an anchor has to be made at that point. This is done with the NAME parameter:
<A NAME="larch">Number 47, the larch</a>It is usually used with section headings:
<H3><A NAME="larch">Number 47: The Larch</a></H3>You would link to this section by using code like
<A HREF="page.html#larch">all about the larch</A>
or
<A HREF="#larch">all about the larch</A>
which you already know becuase you read the
docs on the format of URLs.
Mnemonic: Unnumbered List for UL, List Item for LI
<UL>
<LI>...
<LI>...
<LI>...
<LI>...
</UL>
For unnumbered lists (with bullets where the numbers would be).
Having a UL inside a UL, i.e.,
E.g.,
<UL>
<LI>Part 1
<UL>
<LI>Section I.
<LI>section II.
</UL>
<LI>Part 2
</UL>
makes the bullets turn out differently for each level of LI.
Exactly how they come out varies from browser to browser.
The second-level list will be indented over farther, as in an outline
format.
Note: <LI> can only exist inside of an ordered or unnumbered list.
Mnemonic: Ordered List for OL, List Item for LI
<OL>
<LI>...
<LI>...
<LI>...
<LI>...
</OL>
Just like <UL> except that there's numbers instead of bullets.
Note: <LI> can only exist inside of an ordered or unnumbered list.
With Netscape extensions (which won't work well under Lynx), you can create outline formats. (Regrettably, there is no standard way to do this.)
<OL TYPE=I> <LI>Très important <OL TYPE=a> <LI>première chose <LI>deuxière chose <OL TYPE=1> <LI>première chinoiserie <LI>et cétera </OL> <LI>troisième chose </OL> <LI>Et cétera </OL>
Mnemonic: Preformatted
<PRE>... </PRE>PRE surrounds preformatted text. Spaces, tabs, and linebreaks are rendered by the browser. Preformatting text is the only way in HTML to do columns and ASCII diagrams.
It is also used for "computer listings", e.g.,
huey> w 10:20am up 8:13, 168 users, load average: 10.00, 9.82, 8.64 User tty login@ idle JCPU PCPU what hbact283 ttyrc 10:18am 1 -csh hfoao039 pty/ttyb0 9:59am 2 email zxu pty/ttyb1 10:17am 2 -csh
Mnemonic: Definition List for DL, Definition Term for DT, and Definition Description for DD
<DL>
<DT>term
<DD>description
<P>description
<DT>term [etc]
</DL>
Definition list-- for "glossary" style.
This style is sometimes used just for indenting, although this can have unpredictable results on some browsers, and must be avoided for such a purpose.
However, it is useful for anything (glossaries totally aside) where you are alternating between topic names and topic descriptions and won't want to go as far as using headers. Example:
That's Mayan date 12.17.19.2.1, 1 Imix 4 Mol if you're curious.
Note: <DT> and <DD> can only exist inside of a <DL>
Note: by adding the compact parameter to the <DL>
tag, as in <DL compact>, you can produce a more concise listing on
some browsers; other browsers will ignore the compact parameter.
<BLOCKQUOTE> ... <P> ... <P> ... </BLOCKQUOTE>For block-quotes or pull-quotes; usually rendered as indented on both sides; sometimes with a minor font change.
Example:
Chez certains auteurs come Brantome (1540-1614), le redoublement des consonnes atteindra des proportions fligeantes: escrupulle, escandalle. ... (Monnerot-Dumaine, 13)
sendmail -oi -oem -t -AA081111715
From the steel rack
I take the jacket; brown, tan and red,
Made from
Navajo
Scraps of Navajo
And now we have
<IMG SRC="yip.gif" ALT="an incomprehensible glyph">
for your viewing enjoyment!
This will come out on a graphical browser with image-loading on as:
And now we have
,
for your viewing enjoyment!
and under Lynx or a graphical browser with image-loading off, it'll come out as:
And now we have an incomprehensible glyph, for your viewing enjoyment!
The comments must contain no <'s, >'s, or -'s.
Examples of correct usage:
<!-- modification made 04/05/95 by Doug Davis -->
<!-- should we delete the above paragraph? -->
<!-- you'll have to check that URL, OK? -->
(BTW, as to the content of the style sheet, it is gibberish (well, a randomly cut & pasted copy of the beginning of the book of Revelations, in Swahili, which is as close to gibberish as anything can come), but then, being a style sheet, this is the one time on the Web where form is more important than content!)