Grinnell Summer 1998 Web Workshop

[Front Door] [Back Door] [Schedule] [Leaders] [Participants] [HTML] [Discussion Topics] [Software] [Links] [Search]


SamR's Quick HTML Reference

Since I teach a variety of people about HTML, I find it appropriate to keep a simple reference to HTML handy, as much of the HTML documentation is either unwieldy or outdated. For example, the HTML 3.0 documentation runs over 190 pages, and many of the traditional HTML references available at the time that I first wrote this (ca. 1995) included deprecated elements, such as <menu>. These days, there are now good references, but I still find it convenient to have my own.

Unfortunately, the time pressures of academic life have not given me sufficient opportunity to flesh-out all of this document (e.g., HTML's relationship to SGML). Nonetheless, both my students and I find it of some use, particularly in the electronic form.


Introduction

HTML, the hypertext markup language is a common language for building hypertext documents for the World-Wide Web. Originally, authors had to build their documents in "raw HTML" because no tools were available. Now that such tools are available, many people no longer directly write HTML. Nonetheless, there a good reasons to learn HTML, particularly because it helps you understand what is and is not possible on the web.

More recently, other markup languages have been developed and extensions to HTML have been added. One key successor to HTML is XML (extensible markup language). The extensions are often platform specific. Neither additional languages nor extensions are covered in this document.

Note that HTML is a markup language, not a programming language. What's the difference? A markup language indicates information about the structure or purpose of pieces of information; a programming language indicates information about the execution of a process (more or less).

HTML Tags

In HTML, as in most markup languages, a page author marks up the document, indicating the roles of various parts of the page. One might indicate that something is the title of the document, the beginning of a section, an item in a list, and so on and so forth.

In HTML, textual elements are traditionally surrounded by tags, although there are some tags that act as text elements. A piece of marked-up text looks something like

<TAG>some text</TAG>

Attributes

In addition, certain tags may have attributes (additional characteristics). For example, in Netscape's version of HTML, items in a list may indicate the type of mark that accompanies the item. In such cases, a piece of marked-up text looks something like

<TAG ATTRIBUTE_NAME=ATTRIBUTE>some text</TAG>

For example, one might indicate the title of a document with

<title>SamR's Quick HTML Reference</title>

Similarly, one might describe a table with a larger border with

<table border=10> ... </table>

Logical and physical markup

Note that there are traditionally two kinds of markup: logical markup, in which one describes the roles of pieces of text (e.g., "this is a section heading") and physical markup, in which one describes the appearance of text (e.g., "this is times, twelve point, bold, centered"). Logical markup supports better information retrieval and permits readers to select appearances they find most appropriate. HTML provides a mixture of logical and physical markup tags, with some bias towards logical markup.

Structure of HTML documents

Each HTML document is broken into two pieces:

As one might expect, the head is surrounded by <head> and </head> tags, and the body is surrounded by <body> and </body> tags. Netscape extends the body tag with a background attribute. I feel that this makes documents unreadable, but your mileage may vary.

In addition, the whole document should be surrounded by <html> and </html> tags.

A basic HTML document might therefore appear as follows:

<html>
<head>
<title>A basic HTML document</title>
</head>
<body>
This is the only line in the document.
</body>
</html>

Components of the head

Paragraphs in HTML

Headers

HTML uses a hierarchical heading system, with labels from <h1> to <h6> Much of the documentation suggests that you only use them in order. For example, you should always begin your documents with an h1 tag and you should never use an h3 tag without a surrounding h2 tag.

Text Styles

Graphic elements

Links and anchors

Lists in HTML

Tables in HTML

Miscellaneous


Index of HTML Tags


Samuel A. Rebelsky, rebelsky@math.grin.edu


[Front Door] [Back Door] [Schedule] [Leaders] [Participants] [HTML] [Discussion Topics] [Software] [Links] [Search]

These are rough notes prepared quickly for this workshop. They are not guaranteed to be accurate, useful, or even proofread.

Source text last modified Sun Jul 12 21:46:17 1998.

This page generated on Mon Jul 13 16:24:01 1998 by SiteWeaver.

Contact our webmaster at rebelsky@math.grin.edu