CHASS

TUTORIAL & HANDS-ON COMPUTING SESSION #3b
AUTHORING FOR THE WWW

The Aim of this Session

This session will introduce setting up well-designed and reliable web sites for research projects, courses, and personal use at CHASS. The focus will be on the basics of the HyperText Markup Language (HTML), the use of images on the Web, as well as Web page design and construction.

Basic Definitions and Concepts

Graphic Representation Web Workings

Web pages, which are written in Hypertext Markup Language (HTML), are accessed by a Uniform Resource Locator (URL) that is sent to a server by your Web browser by means of the Hypertext Transfer Protocol (HTTP).

http://www.chass.utoronto.ca:8080/chass/tutor.html

If you need more information on Internet Basics or the WWW,
please refer to the CHASS Tutorials and Hands-on Computing Sessions on
CHASS Fundamentals or Navigating the WWW.

HyperText Markup Language (HTML)

HTML (HyperText Markup Language) is the coding language used to mark up text files with styles and links for use with World Wide Web browsers, such as Netscape or Internet Explorer.

General Characteristics of HTML

Markup languages are used all the time by word processors (e.g., when you use the "reveal codes" command in WordPerfect) to mark up the physical characteristics of a document. For instance, the following sentence: "This is bold" is coded (approximately) by WordPerfect as "This is [BOLD] bold [BOLD]". Likewise, HTML is a markup language that uses special tags to define the characteristics of a document. Some important characteristics of HTML include:


HTML Element Tags

HTML is composed of tagged elements that instruct Web browsers to perform a defined task (make text bold, insert a paragraph break, or format and number a list in a predetermined manner). HTML tags consist of individual elements inside angle brackets. Here are a couple common tags:

Characteristics of HTML Tags

As the above examples illustrate, HTML tags differ depending on what function they perform. Elements can be container elements or empty elements, and may take attributes or may not take attributes.

HTML uses two types of elements: empty (or open) and container tags. These tags differ because of what they represent. Empty tags represent formatting constructs, such as line breaks and horizontal rules. These tags indicate "one time" instructions that Web browsers can read and execute without concern for any other HTML construction or document text.
Container tags define a section of text (or the document itself) and specify the formatting or construction for all of the text between the start and end tags. A container tag has both a beginning and an ending: the end tag is identical to the start tag, with the addition of a forward slash ("/"). Most containers can overlap and hold other containers or empty tags.
Many HTML elements take additional attributes to increase their functionality. These attributes are passed on to the client software and affect the way the element is applied to the section of text (or, with empty tags, how the tag's construct is displayed in the viewing software's window).
For example, the heading 1 element used above can take an alignment attribute that can make the heading centred or left or right alignment. NB. Attributes are contained within the start tag's angle brackets. E.g., <H1 ALIGN="CENTER">This is a heading</H1>.
HTML element names are case independent. You can write tags with any mixture of upper and lowercase characters. For example, you can write one tag that defines the formatting of a section of text as <BLOCKQUOTE>, <blockquote>, <BlockQuote>, or even <bLocKquOtE>. Nevertheless, it is a good practice to write tag elements in all uppercase so that they stand out from the rest of the text.

The Structure of HTML Documents

As noted above, HTML is a structured language in that there are certain rules to follow to write good HTML. An HTML document consists of three major containers, or structural blocks. Note the following example:

     <HTML>

          <HEAD>
             <TITLE> The Title goes in here </TITLE>
          </HEAD>

          <BODY>
               Put the body text in here.
          </BODY>

     </HTML>


The three major container elements of all HTML documents are:



Some Examples

Before we go on to look at the tag elements in more detail, let's look at a couple examples:

HTML Tags in More Detail

The follow section will go into a bit more detail on the different HTML element tags as they appear in the structure of an HTML document, i.e., Head first, so to speak!

The HEAD Element

The HEAD section of an HTML document precedes the main content of the document. It provides information for both the viewer software and the end user. Writing proper document heads is not only good HTML, it also prepares your documents to be used by additional applications, such as indexing robots/crawlers, as well as special WAIS searches.

HTML Elements for Head Sections

Element Element Type Description
BASEemptyBase context document
HEADcontainerDocument head
ISINDEX emptyDocument is a searchable index
LINKemptyLink from this document
METAcontainerGeneric meta-information. This is important if you want to create pages that can be indexed by some robots.
NEXTIDemptyNext ID to use for link name
TITLEcontainerTitle of document


For our purposes, the two important tag elements for the HEAD are the TITLE and META elements:

The BODY Element

The BODY of an HTML document contains the "meat" of the Web page. This is what everyone sees and reads when they access your page. There are innumerable element tags for this section, all which give you considerable latitude in the display of your page. Naturally, we'll only be able to cover a few of the more common ones.

HTML Elements for Body Sections

ElementElement Type Description
AcontainerAnchor: source and/or destination of a link
ADDRESS containerAddress, signature, or byline for a document or passage
BcontainerBold text
BLOCKQUOTEcontainerQuoted passage
BODYcontainerDocument body
BRemptyLine break
CITEcontainerName or title of cited work
CODEcontainerSource code phrase
DDemptyDefinition of term
DIRcontainerDirectory list
DLcontainerDefinition list, or glossary
DTemptyTerm in definition list
EMcontainerEmphasized phrase
H1containerHeading, level 1
H2containerHeading, level 2
H3containerHeading, level 3
H4containerHeading, level 4
H5containerHeading, level 5
H6containerHeading, level 6
HRemptyHorizontal rule
IcontainerItalic text
IMGemptyImage; icon, glyph, or illustration
KBDcontainerKeyboard phrase, such as user input
LIemptyList item
LISTINGcontainerComputer listing
MENUcontainerMenu list
OLcontainerOrdered or numbered list
PemptyParagraph
PREcontainerPreformatted text
SAMPcontainerSample text or characters
SELECTemptySelection of option(s)
STRONGcontainerStrong emphasis
TTcontainerTypewriter text
ULcontainerUnordered list
VARcontainerVariable phrase or substitutable
XMPcontainerExample section



As the HTML standard changes, elements will be deprecated, or replaced by new elements with greater functionality. Deprecated elements will still be supported by existing WWW viewers but may not be in the future. Be prepared to review your older HTML documents for deprecated elements that may no longer be useful.


Some More Examples

Before we go on to look at the tag elements in more detail, let's look at a couple examples:



For convenience, I have abbreviated NSCA's Beginner's Guide to HTML. Let's look at it now to go into a bit more detail on some of these links.


Setting Up a Web Page on CHASS

NB. CHASS users can create their own personal Web pages as long as they comply with the University's policy on appropriate use of information technology. The CHASS Facility has the right to restrict the resources (human and computing) devoted to creating and maintaining personal home pages.

We would appreciate it if you could include a disclaimer stating the you, and not CHASS, is responsible for the content of the material that you make available on the Web.

The base URL (Uniform Resource Locator) or address to the information you make available on the Web is:

          http://www.chass.utoronto.ca/~userid
      
where userid is your CHASS account name.

The following outlines the steps necessary for users with current computing accounts to set up personal Web pages at CHASS:

Here is a Template HTML document that you may want to use as a guide for your Web page.
The CHASS Web server will look for Web pages in a directory named public_html in your CHASS home directory. Any subdirectory of the public_html directory can also be used, so you can organize the location of your Web pages to make it easier to maintain. The specific URL that would be used to access:
          /homes/userid/public_html/page.html
      
would be:
          http://www.chass.utoronto.ca/~userid/page.html

To do these steps Telnet to CHASS


[CHASS Tutorials Main Index] | [WINTER '96 Tutorials Index | [CHASS Homepage]