Designing and Building Course-Based Webs

[Introduction] [Handouts] [Basics] [HTML] [First Page] [Design] [Markup] [More HTML] [Searching] [References] [Process] [Terminology] [Tips] [HTML Guide] [Books] [Bookmarks] [Tools]


A Quick HTML Reference

Abstract: A short reference to the basics of HTML.


Introduction

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 the traditional HTML quick reference found at http://kuhttp.cc.ukans.edu/lynx_help/HTML_quick.html still contains many deprecated elements, such as <menu>. While I like the Bare Bones Guide to HTML at http://www.werbach.com/barebones, I found that it is a little too terse for my students.

Unfortunately, my standard time pressures prevent me from making this a perfect document, and it is undoubtedly missing some of the components you might want to know about. Nonetheless, both my students and I find it of some use, particularly in the electronic form, and I hope you will, too.


HTML Tags

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>

In addition, certain tags may have attributes. 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> ... </tabl>


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


Headings

HTML uses a hierachical heading system, with labels from <h1> to <h6> Much of the documentation suggests that you only use them in order (that is, don't nest h5 in h3 without an intervening h4).


Text Styles


Special characters

In general, special characters in HTML have the form &name;. There are more such characters than I want to list. Some of the more common ones are


Graphic elements


Links and anchors


Lists in HTML


Tables in HTML


Forms

Forms are normally used to provide data to a CGI program, such as a search engine. They may also be used for input and output for some programming languages, such as JavaScript.


Miscellaneous


Index of HTML Tags


[Introduction] [Handouts] [Basics] [HTML] [First Page] [Design] [Markup] [More HTML] [Searching] [References] [Process] [Terminology] [Tips] [HTML Guide] [Books] [Bookmarks] [Tools]

This page written by Samuel A. Rebelsky.

This page generated on 54 by SamR's Site Suite.