HTML Style Guide & Test Suite

        Paraphrasing that old Chinese proverb, this document is designed to demonstrate that one example is more effective than 1,000 descriptive words.

        If you are viewing this document using Netscape and would like to see the HTML source producing this display select View on the menu bar and then Source from the drop-down menu.

        If you are using Mosaic and would like to see the HTML source producing this display select File on the menu bar and then Document Source from the drop-down menu.

Table of Contents

The above table of contents is an unordered list. Each element is a hyperlink in the form of:

<A HREF=#branch-name>branch-title</A>

The target anchor is in the form of:

<A NAME=#branch-name>display-anchor-title</A>

HTML Headings

Heading One <H1>

Heading Two <H2>

Heading Three <H3>

Heading Four <H4>

Heading Five <H5>
Heading Six <H6>

Back to Table of Contents

General Link Information

A hypertext link has two components, the visible and invisible parts. The visible part, called the anchor, is the highlighted portion that you see on your display. The invisible part is the component instructing the browser where to find the desired resource. The general format of a link is:

<A HREF=[transfer-protocol][web-location]resource-name> anchor-prompt</A>

Back to Table of Contents

Links to Other Places Within the Same Document

The table of contents in this document uses internal links. There are two components required, the pointer and the branch location within the document. The pointer takes the form of:

<A HREF=#branch-label>title</A>

The pointer to this section is:

<A HREF=#SAME>To other places within the Same Document</A>

The desired location tag pair takes the form of:

<A NAME="branch-location"><title</A>

The target tag pair for this section is:

<A NAME="SAME"><Links to other places within the Same Document</A>

Back to Table of Contents

Links to Other Resources at the Same Web Site

If the desired resource is located at the same Web site and uses the same protocol, all that is needed is the name of the resource. This pointer takes the form:

<A HREF=resource-name>anchor-prompt</A>

To illustrate, a file named SECOND.HTM which is located at the same site and in the same directory as the document currently being viewed would be fetched using the link:

<A HREF=SECOND.HTM>Click here to activate SECOND.HTM</A>

Back to Table of Contents

Hypermedia Links in Web Space

An external link points to a resource at another Web site. As an example, my home page link is:

<A HREF=HTTP://www.charm.net/~lejeune>Urb's Home Page</A>

It would appear on you screen as: Urb's home page

Back to Table of Contents

Plain Text

Most Web pages consist of plain text, which is any text appearing outside of an attribute tag pair. Web viewers ignore multiple spaces, tabs, and line breaks while "word-wrapping" text. You have no control over the display of plain text. If you desire a line break inserted in your text use the <BR> tag. To force a paragraph use the <P> tag.

Line one. <BR> Line two. <P> appears as:
Line one.
Line two.

If text is to be display with formatting retained, as an example a program listing, use the <PRE> </PRE> tag pair.

Paragraphs are not indented, however, multiple blanks are inserted using a series of "&#160;" groupings. This paragraph starts with two such groupings.

Logical Text Styles

This sentence is normal text. Each of the following styles is enclosed between the tags indicating the style. Emphasized Text

Strong Text

Cited Text line break is next.

Physical Text Styles

Bold Text

Italics Text

Underlined Text

Typewriter Font

Horizontal Rule <HR> is next


Inline Graphics

An inline graphic is treated like a character, albeit a very large one, by graphical WWW browsers. The format for displaying an inline image is

<IMG [ALT="alternative-text"] [ALIGN=text-position] SRC=url-of-graphic>

Where "alternative-text" is the text that will be displayed, in lieu or the image on a non-graphic browser such as lynx.

The parameter for ALIGN= may be TOP, CENTER, or BOTTOM. This determines where one line of text will be display within the same paragraph.

Align Top Netscape Image Goes Here Align Top

Align Middle Netscape Image Goes Here Align Middle

Align Bottom Netscape Image Goes Here Align Bottom

Back to Table of Contents

Thumbnail Sketches

A thumbnail sketch is small graphic display that points to a larger version of the same graphic. It has the advantage of not requiring the full graphic to be transmitted and displayed unless the user specifically requests the larger display.

<A HREF=large-graphic-file><IMG SRC=thumb-nail-graphic-file> </A>

Click on the thumbnail graphic to activate a larger graphic.
The heavy border around the graphic indicates that the image is a pointer.

Back to Table of Contents

Character Entities -- Special HTML Characters

These characters are formed using either the "&special-name;" or the "&#nnn;" (where nnn is the numeric code) format conventions. As an example the double quote is &quot; and the Yen symbol (¥) is "&#165 ;".

quot=", amp=&, lt=<, gt=>, iexcl=¡, cent=¢, pound=£, curren=¤, yen=¥, brvbar=¦, sect=§, uml=¨, copy=©, ordf=ª, laquo=«, not=¬, shy=­, reg=®, hibar=¯, deg=°, plusmn=±, sup2=², sup3=³, acute=´, micro=µ, para=¶, middot=·, cedil=¸, sup1=¹, ordm=º, raquo=», frac14=¼, frac12=½, frac34=¾, iquest=¿, Agrave=À, Aacute=Á, Acirc=Â, Atilde=Ã, Aumi=Ä, Aring=Å, AElig=Æ, Ccedil=Ç, Egrave=È, Eacute=É, Ecirc=Ê, Euml=Ë, Igrave=Ì, Iacute=Í, Icirc=Î, Iumi=Ï, ETH=Ð, Dstrok=Ð, Ntilde=Ñ, Ograve=Ò, Oacute=Ó, Ocirc=Ô, Otilde=Õ, Oumi=Ö, Oslash=Ø, Ugrave=Ù, Uacute=Ú, Ucirc=Û, Uuml=Ü, Yacute=Ý, THORN=Þ, szlig=ß, agrave=à, aacute=á, acirc=â, atilde=ã, aumi=ä, aring=å, aelig=æ, ccedil=ç, egrave=è, eacute=é, ecirc=ê, euml=ë, igrave=ì, iacute=í, icirc=î, iuml=ï, eth=ð, ntilde=ñ, ograve=ò, oacute=ó, ocirc=ô, otilde=õ, ouml=ö, oslash=ø, ugrave=ù, uacute=ú, ucirc=û, uuml=ü, yacute=ý, thorn=þ, yuml=ÿ

Back to Table of Contents

HTML Lists

Ordered List <OL>
  1. <LI> Ordered List Item One
  2. <LI> This is Item Two
Unordered List <UL>
Directory List <DIR>
  • <LI> Directory List Item One
  • <LI> This is Item Two
  • Definition List <DL>
    <DT> Definition List first entry to be defined
    <DD> Definition of first entry
    <DT> Second entry to be defined
    <DD> Definition of second entry
    Two Unordered Lists <UL> Nested within an Ordered List <OL>
    1. <LI> Major List Item One
    2. <LI> Major List Item Two
    Menu List <MENU>
  • <LI> First Menu List Item
  • <LI> Second Menu List Item
  • Back to Table of Contents

    Netscape's enhancements to HTML

    Netscape has added a series of enhancements to the existing HTML standard. Be aware, the use of these additional constructs are NOT supported by other browsers. Check the effect of these tags when viewing documents using other popular browsers before adopting.

    Centering Text and Images

    The most popular of Netscape's enhancements is the text centering.

    Centering Example

    The above example is produced by

    <CENTER><IMG SRC=home.gif> <B>Centering Example</B></CENTER>

    Blinking Text

    Blink is the most derided Netscape's enhancement. People either love it or hate it, with the later predominating. Use it sparingly.

    Cool Dude

    The above example is produced by

    <BLINK><B>Cool</B></BLINK> Dude

    Both Center and Blink can be used with relative impunity. If a browser doesn't support the enhancement it is ignored. The text will still be produced, without the centering or blinking.

    Font Sizing

    Font size can be changed on the fly using the FONT tags in the form:

    <FONT SIZE=N>text</FONT>

    Where N is an integer between 1 and 7 with 3 being the default.

    The following examples were started with:

    <FONT SIZE=1>One</FONT><BR>

    Through

    <FONT SIZE=7>Seven</FONT><BR>

    One
    Two
    Three
    Four
    Five
    Six
    Seven
    An interesting (?) effect is produced when placing varying font sizes on the same line, as in the following example. The first letter is FONT SIZE=1 and each letter increases by one through 7 and then decreases by 1.

    ABC DEF G HIJ KLM

    Base Font Sizing

    Font size may also be changed using the BASEFONT tag <BASEFONT SIZE=N>, where N in an integer in the range of 1 to 7 which represent the range of font sizes. The sizing integers are identical to the font sizes produced by the FONT SIZE pair. A major difference is the absence of a closing tag. Once the font size is changed it remains in effect until a new BASEFONT tag appears. If there is an embedded FONT SIZE pair, the font size returns to the stated BASEFONT size following the closing </FONT> tag. I would strongly suggest that you either don't use this enhancement -- since it tends to be at odds with conventional HTML matching tag pair wisdom -- or that your immediately enter a <BASEFONT SIZE=3> as a pseudo closing tag which will set the font size back to normal.

    This line produced following a <BASEFONT SIZE=1> tag
    <FONT SIZE=4> Embedded FONT SIZE=4 pair</FONT>
    This line follows the embedded tag pair and is back to the BASEFONT size of 1

    The previous line is: <BASEFONT SIZE=3> <!-- Set font size back to normal -->

    Stayed tuned. More HTML enhancements are on the way.

    Back to Table of Contents

    Please subscribe to the free ATS Newsletter so we can keep you
    up to date with our "free stuff", special offers, and other goodies.
    We will not supply your e-mail address to anyone else.
    Your e-mail address:

    Back to the ATS Home Page

    Please sign our self-updating guestbook

    How about some free stuff from ATS?

    Please send our crotchety Webmaster some mail.
    Copyright ©1995-98 America's Town Square
    15 Hunter Drive
    Tuckerton, NJ 08087
    (609) 294-0320