HTML info

A uniform resource identifier or URI is a way to refer to certain things, such as the HTML document that is the source of this page; the URI for this page might then be

http://www.math.metu.edu.tr/~dpierce/html_info.html.

More information is at Berners-Lee et al., Uniform Resource Identifiers (URI): Generic Syntax.

To see the source of a document such as the present one, in Netscape, click on View, then Page Source; alternatively, before the URI in the Go to: window, type view-source:. (On complicated pages these methods can have different results.)

The following notes are based on the HTML 4.01 Specification of the World Wide Web Consortium.

An element is a certain sort of section of an HTML document. Elements can be nested. An element has up to three parts:

  1. start tag,
  2. content,
  3. end tag.
The name of the element type appears in the start tag and end tag. The name is case-insensitive. The tags are delimited by angle-brackets. The end tag has a slash after its opening bracket.

An element may have an attribute, which may have a value. An attribute name appears in the start tag after the element type. If the attribute has a value, then the attribute name is followed by an equals-sign, and then by the value in quotes. Further attribute name/value pairs may be listed, separated by spaces; the order of these pairs does not matter (check this). The attribute name is case-insensitive; the value is usually so. To delimit values, double-quotes or single-quotes can be used, the one kind if the other kind appears in the value. A quotation-mark can be given in various ways:

Quotes need not be used if the value is made up only of (unadorned) letters, digits, hyphens, underscores and colons.

An HTML document may contain comments. A comment is introduced by the markup declaration open delimiter, or <!, followed immediately (with no whitespace) by the comment open delimiter, or --. The comment close delimiter is the same as the open; it is followed by the markup declaration close delimiter, or >, possibly with intervening whitespace. (Reference)

An HTML document is begun with a document type declaration, such as

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">.

The rest of the document constitutes an HTML element. For this, tags are optional. The HTML element has two constituent elements, tags optional for each:

  1. HEAD, and
  2. BODY.
The HEAD element must contain a TITLE element. (The content of this will appear at the top of a Netscape window.) This element is unique for the document. (By contrast, various elements may have the title attribute, whose value might be displayed as a "tool tip" for example.)

One may want to provide meta data for an HTML document; this is done through the HEAD element and through META and LINK elements in it.

Providing a meta datum means declaring a property and a value for it. The means for interpreting such data may be found in a meta data profile; this profile will reside at some URI.

The HEAD element therefore has a profile attribute, whose value is the URI of the desired meta data profile.

The HEAD element may contain a META element, which is coextensive with its start tag (the element has no content and no end tag). The attributes specific to the META element are:

The value of name names a property. The value of content is the value of that property. How this value is to be understood may be indicated by the value of scheme. The http-equiv attribute may be set instead of name; this then is used "to gather information for HTTP response message headers."

A META element thus determines a property/value pair. If the value is to be a URI, then the LINK element can be used instead to give the pair.

Like the META element, the LINK element has no content or end tag. Some of its specific attributes are these:

The value of href is a URI. The value of the type attribute is the content-type of what is available at that URI. Often this value is text/html (here the type being text, the subtype being html); a full list of possibilities is at ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/. The URI that is the value of the href attribute can be seen also as the value of the property named as the value of either the rel or the rev attribute. Such a value (of one of these attributes) is a link type.

Link types are case-insensitive. Standard ones are the following (others can be defined in a meta data profile):

Alternate; stylesheet; start; next; previous; contents; index; glossary; copyright; chapter; section; subsection; appendix; help; bookmark.

If one of these is the value of the rel attribute, then it describes the relation of the document (for example) at the URI (that is the value of the href attribute) to the present document. If one of the link types is the value of the rev attribute, then it describes the relation of the present document to the other document.

Last change: 16 February 2001 Viewable With Any Browser campaign | HTML 4.01 Validator | CSS Validator