Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

HTML 4.0 Sourcebook
(Publisher: John Wiley & Sons, Inc.)
Author(s): Ian S. Graham
ISBN: 0471257249
Publication Date: 04/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next



Figure 1.17 Listing of the example home page document home.html.

<HTML> <HEAD>

<TITLE> Instructional and Research Computing </TITLE>
</HEAD> <body>
   [<A HREF=“home.html”>            Home  </A>]
   [<A HREF=“help.html”>            Help  </A>]
   [<A HREF=“info.html”>            Info  </A>]
   [<A HREF=“/cgi-bin/mail.pl”>     Mail  </A>]
   [<A HREF=“home.html”>            Up    </A>]
   [<A HREF=“cgi-bin/doc-search.pl”>Search</A>]
<hr>

<H1 ALIGN=“center”> Instructional and Research Computing </H1>

<P>this is the home page of the Instructional and Research Computing
Group <strong>(IRC)</STRONG>, one of seven departments of the Division
of Computing and Communications.  We provide:

<UL>
<LI>support for <A HREF=“MulVis/intro.html”>multimedia and visualization
    techniques</A>
<LI>access to and support for <A HREF=“HPC/intro.html”>high performance
    computing</A>
<LI>support for <A HREF=“AdTech/intro.html”>adaptive technology</A>
    (aids for the physically challenged).
</UL>
<P>Some other useful University resources are:<BR>
   <A HREF=“Lists/Lists.html”> WWW Starting Points </A> |
   <A HREF=“Lists/Lists.html”> WWW Search Tools</A> |
   <A HREF=“Lists/Libraries.html”> Libraries </A> |
   <A HREF=“http://www.utoronto.ca/uoft.html”> Main University Home Page </A>
<P>if you become lost in our documents use the navigation icons.
   The <em> home </EM> icon brings you back here, while the <em> up </EM>
   icon takes up one level in the document hierarchy.  <em> Info </EM>
   and <em> help </EM> are also useful, while the <em> letter</EM> icon
   let you send us a message, and the <em> search </EM> icon allows you
   to do a text search of our pages.
<HR SIZE=“1” NOSHADE“>
  <A HREF=”home.html“><IMG SRC=”home.gif“ ALIGN=”TOP“
     ALT=”Home“></A><A
     HREF=”help.html“><IMG SRC=”ic_help.gif“ ALIGN=”TOP“
     ALT=”Help“></A><A
     HREF=”info.html“><IMG SRC=”ic_info.gif“ ALIGN=”TOP“
     ALT=”Info“></A><A HREF=”/cgi-bin/mail.pl“><IMG SRC=”ic_mail.gif“
     ALIGN=”TOP“ ALT=”Mail“></A><A
     HREF=”home.html“><IMG SRC=”ic_up.gif“ ALIGN=”TOP“
     ALT=”Up“  ></A><A
     HREF=”cgi-bin/doc-search.pl“><IMG SRC=”ic_find.gif“
     ALIGN=”TOP“ ALT=”Search“></A>
<HR SIZE=”1“ NOSHADE”>
<address>
<A HREF=“Staff/web_admin.html”>webmaster@site.address.edu</A>
</ADDRESS>
</BODY></HTML>


Figure 1.18  Netscape Navigator 4 rendering of the HTML document home.html (the document is listed in Figure 1.17).


Figure 1.19  Lynx rendering of the HTML document home.html (the document is listed in Figure 1.17).

Heading Alignment with ALIGN

Note also the use of the ALIGN attribute in the heading. The ALIGN attribute can be used with a number of elements (Headings, P, BLOCKQUOTE, ADDRESS, etc.) to define the text alignment within the block; in Figures 1.15 and 1.17, it is used to center the heading on the page. Other possible alignment options are “left” (the default value) and “right,” for right-margin aligned text.

Sign Documents with an ADDRESS

It is always a good idea to sign HTML documents, particularly the home pages or other major pages. This provides information allowing visitors to send feedback or comments regarding the site. The HTML ADDRESS element is specifically designed for address information and is used for this purpose in Figure 1.17. Here, the ADDRESS element contains an e-mail address suitable for feedback and/or commentary about the site. Also, this e-mail address is placed within an anchor element linked to a page (web_admin.html) containing additional information—for example, about the server and server administrator. For more personal projects, this might be an HTML document containing a brief biography of the document author. The link may also be a mailto URL containing the indicated email address—clicking on the link will let the reader send mail to the indicated person.

Horizontal Dividing Lines with HR

As shown in Figures 1.15 through 1.19, the HR element defines a horizontal divider, which is rendered on the display as a solid dividing line. In HTML 4, this element can take a SIZE attribute to specify the height of the dividing line, in pixels (the default is usually 2), as well as a NOSHADE attribute to specify a solid line (the default is a chiseled line). Note how NOSHADE does not take a value. Other attributes are also supported. These are discussed in Chapter 6.

Full Uniform Resource Locators

Looking at Figure 1.17, note that most of the URL references are relative references. There is one, however, that is not. This is the URL pointing to the Main University Home Page. This is a full URL that specifies the complete information needed to access the main University HTTP server:

<http://www.utoronto.ca/uoft.html>

A complete HTTP URL has three main parts, as in this example:

1.  http:—The protocol specifier. The string http: indicates the HTTP protocol. This and other URL schemes are discussed in Chapter 8.
2.  //www.utoronto.ca—The Internet domain name of the server. This gives the Internet name the client should contact. Sometimes, you will see this with a number after the name, for example: www.somewhere.edu:8080. The trailing number is a port number and specifies the port at which the server is actually listening. (Port numbers are rather like local telephone extensions, and allow a single computer to run several different services [FTP, HTTP, etc.] each “listening” at a different port). Most HTTP servers listen at port 80. You can omit the port number from the URL if contacting the server at the default value.
3.  /uoft.html—The path and filename of the desired file (or other resource). Here, the URL is to the file uoft.html that lies right at the top of the server’s document directory which is the directory under which the HTTP server keeps the documents. If the file were in a subdirectory, then that information would be here, so that paths such as: /Examples/ex2a.html (as in Figure 1.12) are possible.

The URL scheme allows for many protocols: ftp: for the FTP protocol; gopher: for the gopher protocol; wais: for the WAIS protocol, and so on. Consequently, using URLs, you can create hypertext links to anonymous FTP servers, Gopher sites, WAIS databases, and many other Internet resources. Web browsers are designed to understand these protocols. When they encounter a hypertext reference in an HTML element such as HREF=“url”, where url points to an anonymous FTP or Gopher site, browsers are able to contact the site, using the appropriate protocol, and access the indicated resource.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.