Current Revision: 1.0 Alpha 2, February 1998
Last Revision: 1.0 Alpha 1, September 1997
The HyperText Markup Language (HTML) is the basis of The Web. Most documents on the web are written using HTML. Those that are not HTML are generally plain text, TeX, or Postscript® anchored to an HTML document. HTML was developed by Tim Berners-Lee as a standard means of conveying information. When Tim Berners-Lee designed HTML his primary goal was to provide a markup language that would convey the full text and meaning of a subject. HTML was designed to allow research groups to share information across the world using a common format. This language needed to have hypertext features to anchor references within the web. This would reduce confusion and eliminate the need for a reader to seek out reference material in vast libraries scattered throughout the web. To reduce confusion and enforce the meaning of a document, visual formatting information was completely omitted. It was felt that conveying information and meaning were the goals, not making a pretty document. Each HTML document had to be fully interpretable by any computer and any person for tens, hundreds, possibly thousands, of years. This meant that HTML had to be robust yet simple. There was a feeling that visual presentation was important, but, needed to be detachable from data. Visual and aural formatting would be provided via detachable style sheets. Detachment of presentation was key to ensuring the longevity and usefulness of the data. A blind user, future user, text terminal, or indexing robot would miss much of the meaning of a visual document. The attached style information could be adjusted to suit the user's needs via negotiation. The user describes how he or she needs the document to be presented and that is incorporated into the author's preferred presentation. Thus you have a compromise between the author's wants and the user's needs.
HTML is a standard generalized markup language (SGML) application with several features of a hypertext language. There are two general types of elements in the HTML document type definition (DTD). Element types can be described as block elements and inline elements. Block elements define distinct blocks of text, such as a paragraph or heading. Inline elements describe various meanings, inflections or references within a block of text.
Here are elements that should be avoided. <B>, <I>, <BLINK> are
non-standard elements; these should be replaced with proper css classifications/identifications. <ISINDEX>, <APPLET>, <CENTER>, <FONT>, <BASEFONT>,
<STRIKE>, <S>, <U>, <DIR>, and <MENU> are all deprecated elements. These elements should not be used, as they will be dropped in future revisions. The effects that these elements provide should be replaced with proper css classifications/identifications. <XMP>, <PLAINTEXT>, and <LISTING> are obsolete; <PRE>, with proper css classifications/identifications, should be used instead.
Here are a few elements that have been added to HTML 4.0. <Q>, <INS>, <DEL>, <ACRONYM>, <LEGEND>, <COLGROUP>, <BUTTON>, and <FIELDSET>. These elements deal, mostly, with HTML 3.2's lacking feature set for <TABLE> and <FORM> containers.
Of course, all of this information means nothing unless you use it. An argument that I often hear, Why should I use this tag when there is little or no browser support?
My answer, Because a standard is only supported by its users.
The creators of HTML work hard on their proposals. We should, at least, honor their effort by support of their work. If enough users support the standards then vendors will be forced to support them as well.
<!DOCTYPE ...> references the DTD. The DTD completely defines each element.
<HTML> marks the beginning and end of HTML code. It may contain HEAD and then BODY. It may be omitted, but, should be included to ensure compatibility among User Agents (UA). <HTML> must be located immediately after a <!DOCTYPE ...> statement.
<HEAD> marks the beginning and end of the header information. It provides background data to the UA. Data such as title, location, author, script, formatting information, etc. This is data that the user usually does not need. The UA utilizes the header information to effect rendering of the document.
<TITLE> provides the document title. All documents must have a title. <TITLE> is the only required element in the HTML language.
<STYLE> contains the cascading style sheet information. This allows you to describe the presentation of your data. This is supported in all graphical HTML 4.0 compliant UAs. Text or speech based UAs may not support style sheets. Speech enhancements are being added to style sheets, though. The contents are surrounded with <!-- ... --> to hide the style information from non-compliant browsers.
<SCRIPT> contains a script that the user agent should execute at runtime. Microsoft Internet Explorer 3.0 or higher and Netscape Navigator 3.0 or higher support ECMAScript (a.k.a. JavaScript). ECMAScript is a standard scripting language, however, it is still not widely supported. In many cases it will probably never be supported. Microsoft Internet Explorer 3.0 or higher supports VBScript as well. Script support is very buggy and unpredictable across the various browsers and platforms. There, currently, is no way to ensure that your script will work properly or at all. In any case, server-side scripting is preferred when possible.
<BASE> is used to indicate the location of the document. A document may be referenced using multiple host addresses. (e.g. http://myserver.dom/ = http://www.myserver.dom/) <BASE> indicates the preferred or original location using the HREF attribute.
<META> is used to send meta-information to the user agent. This information may include author, copyright, contact e-mail, etc. There are three attributes for this tag: HTTP-EQUIV, NAME, and CONTENT. HTTP-EQUIV mean that this information should be treated as if it were part of the HTTP header. NAME supplies information to the user agent. This information could be utilized in many ways. A user agent could perform a keyword search to find matching documents within the history or a list of
favorite sites. This is how most search engines find the keywords for a web
site. The search engine's UA (a.k.a. spider or robot) looks for keywords using the meta information.
<LINK> is used to show this document's relationship to others in the web. You may specify either a direct relationship (REL) or a reverse relationship (REV). REL is used to indicate the relationship to resources such as homepage, table of contents, style sheet, etc. REV is normally used to indicate a backlink to related resources. One common reverse relationship is author. <LINK> is not well supported in many current user agents, but, is very useful for maintaining accurate records of a document's relationship to the rest of the web. Hopefully, future UAs will make use of this. Many current navigational problems could be solved using <LINK>. NCSA Mosaic makes good use of <LINK>. Mosaic creates navigation buttons for each HREF, and, labels each button with the TITLE attribute. Lynx prints a list of links at the top of the screen very similar to Mosaic's buttons.
Let's take a look at an example document header. This example covers all of the attributes and elements discussed.
Header Example:
<HEAD>
<TITLE>My Home Page</TITLE>
<STYLE><!--
body {background-color: #FFFFFF; color: #000000;}
a:link {color:#0000A0;}
--></STYLE>
<SCRIPT LANGUAGE="vbscript"><!--
Sub Form_onLoad()
MsgBox "Boo! Scared You didn't I?"
End Sub
--></SCRIPT>
<BASE HREF="/index.html">
<META NAME="keywords" CONTENT="web design, HTML, tutorial">
<META HTTP-EQUIV="expires" CONTENT="Sat, 27 Sep 1997 00:00:00 GMT">
<LINK REV="made" HREF="mailto:dave@webaugur.com">
<LINK REL="stylesheet" HREF="style.css" TITLE="Dave's Favorite Style">
<LINK REL="parent" HREF="index.html" TITLE="Home Page">
</HEAD>
<BODY> supplies the body of data to the user. This data is structured according to meaning. The body can be viewed as a tree structure. The body is the root with branches expanding the meaning upward and outward. There are many elements used within the <BODY>. The body of the document can become very complex.
There are quite a few elements that deal with text. These are grouped into several categories.
More to Follow...