Getting Started
|
Create a file structure
to which you will be referring.
In the following section, you'll be making references to files in near-by
directories. First, you'll have to create the directory structure in which
to place files. Do this on your own disk or storage medium. Use Windows'
"My Computer" or "Windows Explorer" File > New
command to create the structure in your public_html\inp150
directory. The structure is portrayed in three ways to make it as clear
as possible - as a diagram, in outline form, and using verbal directions.
|
Diagram:

|
Outline:
|
|
|
Verbal directions:
- Create a folder called pet_info
- Inside pet_info, create three folders:
- create a folder called images
- create a folder called dogs
- create a folder called cats
- In the dogs folder, create two folders:
- create a folder called chihuahua
- create a folder called doberman
- In the cats folder, create two folders:
- create a folder called siamese
- create a folder called persian
|
|
Task 1


Illustration of the template file: link
to 50% screenshot.

Illustration of the Index page: link
to 50% screenshot.
|

Create files in the
directories
- Create a modification of your template.htm file with these features:
- Color the body of the page light yellow: #FFFFCC
- Color the text dark brown: #666600
- At the top, put an H1 heading: "Sarah Strong Pet Service" (changing
Sarah's name to your own, of course).
- An H2 heading: "Topic", which you will change in each of the files
you create.
- A relative link to your inp150/home.htm file.
- Center everying on the page. (Hint: include this as a style of the body
tag.)
- Save the file as w23m-template.htm, and use it to create all
the other files for this task.
When
you create links in these files, put each on a separate line, either by putting
<br /> between each, or by making each a separate paragraph.
- In the pet_info folder, create a file called index.htm:
- Change "Topic" to "Our Most Popular Pets"
- Create an H3 "Dogs" with a relative link to the index.htm
file in the dogs subdirectory.
- Create an H3 "Cats" with a relative link to the index.htm
file in the cats subdirectory.
- Make sure the relative links to inp150/home.htm are correct for
a file at this level.
- In the dogs folder, create index.htm, with:
- "Topic" changed to "Two Popular Dogs"
- an H3 heading "The Chihuahua" and link it to index.htm
in the chihuahua subdirectory
- another H3 heading "The Doberman" and link it to index.htm
in the doberman subdirectory
- a relative link "To Cats" to the index.htm in the cats
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- In the doberman folder create three files:
- index.htm with:
- "Topic" changed to "The Doberman"
- an H3 heading "Long-eared" with a link to long-ear.htm
- a second H3 heading "Short-eared" with a link to short-ear.htm
- a relative link "Back to Dogs" to the index of the dogs
folder
- a relative link "To Cats" to the index of the cats folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- long-ear.htm with:
- The "Topic" changed to "Long-Eared Doberman"
- a relative link "Other Dobermans" to the index of the doberman
folder
- a relative link "Back to Dogs" to the index of the dogs
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- short-ear.htm with:
- The "Topic" changed to "Short-Eared Doberman"
- a relative link "Other Dobermans" to the index of the doberman
folder
- a relative link "Back to Dogs" to the index of the dogs
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- In the chihuahua folder create three files:
- index.htm with:
- "Topic" changed to "The Chihuahua"
- an H3 heading "Long-haired" with a link to long-hair.htm
- a second H3 heading "Short-haired" with a link to short-hair.htm
- a relative link "Back to Dogs" to the index of the dogs
folder
- a relative link "To Cats" to the index of the cats folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- long-hair.htm with:
- The "Topic" changed to "Long-haired Chihuahua"
- a relative link "Other Chihuahuas" to the index of the chihuahua
folder
- a relative link "Back to Dogs" to the index of the dogs
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- short-hair.htm with:
- The "Topic" changed to "Short-haired Chihuahua"
- a relative link "Other Chihuahuas" to the index of the chihuahua
folder
- a relative link "Back to Dogs" to the index of the dogs
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- In the cats folder, create index.htm, with:
- "Topic" changed to "Two Popular Cats"
- an H3 heading "The Siamese" and link it to index.htm
in the siamese subdirectory
- another H3 heading "The Persian" and link it to index.htm
in the persian subdirectory
- a relative link "To Dogs" to the index.htm in the dogs
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- In the persian folder create three files:
- index.htm with:
- "Topic" changed to "The Persian"
- an H3 heading "Kittens" with a link to kitten.htm
- a second H3 heading "Adult" with a link to adult.htm
- a relative link "Back to Cats" to the index of the cats
folder
- a relative link "To Dogs" to the index of the dogs folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- kitten.htm with:
- The "Topic" changed to "Persian Kittens"
- a relative link "Other Persians" to the index of the persian
folder
- a relative link "Back to Cats" to the index of the cats
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- adult.htm with:
- The "Topic" changed to "Adult Persians"
- a relative link "Other Persians" to the index of the persian
folder
- a relative link "Back to Cats" to the index of the cats
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- In the siamese folder create three files:
- index.htm with:
- "Topic" changed to "The Siamese"
- an H3 heading "Traditional Siamese" with a link to traditional.htm
- a second H3 heading "Gimson Simese" with a link to gimson.htm
- a relative link "Back to cats" to the index of the cats
folder
- a relative link "To Dogs" to the index of the dogs folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- traditional.htm with:
- The "Topic" changed to "Traditional Siamese"
- a relative link "Other Siamese" to the index of the siamese
folder
- a relative link "Back to Cats" to the index of the cats
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
- gimson.htm with:
- The "Topic" changed to "Gimson Siamese"
- a relative link "Other Siamese" to the index of the siamese
folder
- a relative link "Back to Cats" to the index of the cats
folder
- Make sure the relative link to inp150/home.htm is correct for a
file at this level.
With your browser, check each of the links, repairing broken ones as
necessary.
|
|
Task 2


Illustration of the Gimson Siamese page: link
to 50% screenshot.
|
Put pictures in the
files
Go to the files in folder w23m on this server: http://courses.wccnet.edu/computer/mod/w23m_images/
and save each of the image files on your disk under public_html/inp150/pet-info/images
Using a relative link, put images in each of these files. Include alternate
text, height, and width in each image tag.
- In folder chihuahua:
- In file short-hair.htm, put chihuahua-short.jpg
- In file long-hair.htm, put chihuahua-long.jpg
- In folder doberman:
- In file short-ear.htm, put doberman-short.jpg
- In file long-ear.htm, put doberman-long.jpg
- In folder persian:
- In file kitten.htm, put persian-kitten.jpg
- In file adult.htm, put persian-adult.jpg
- In folder siamese:
- In file traditional.htm, put siamese-traditional.gif
- In file gimson.htm, put siamese-gimson.jpg
- View each of these files in your browser, and make sure the pictures
show.
Put the file structure
on your Web site
Upload pet-info together with all its sub-folders and files,
to your inp150 Web directory.
Check each of the links and images again, to make sure everything got
to the server and is correctly linked. |
|
Summary of the Structure
|

Here is an outline of the file structure as a whole:
- pet_info (folder)
- index.htm
- dogs (folder)
- index.htm
- chihuahua (folder)
- index.htm
- short-hair.htm
- long-hair.htm
- doberman (folder)
- index.htm
- short-ear.htm
- long-ear.htm
- cats (folder)
- index.htm
- siamese (folder)
- index.htm
- traditional.htm
- gimson.htm
- persian (folder)
- index.htm
- kitten.htm
- adult.htm
- images (folder)
- chihuahua-long.jpg
- chihuahua-short.jpg
- doberman-long.jpg
- doberman-short.jpg
- persian-adult.jpg
- persian-kitten.jpg
- siamese-traditional.gif
- siamese-gimson.jpg
|
|
Submitting the Assignment

|
When you're done, double-check that the assignment meets
the specifications above, and that all links are functional.
Send email to the instructor with the URI. Be sure your
email meets the formal requirements: name, class, section and exercise
(W23m), and that it follows standard business-email practice.
|
About This Document |
|
Audience
|
This exercise is for people who are familiar with HTML linking
(see modules W23c, W23d,
and W23k), and need to practice the use of relative
addressing.
|
| Objectives |
On successful completion of this module, you will be able to:
- Create a directory structure appropriate to a Web site;
- Link to files and images above, below, and across the directory
structure.
|
| Module W23m: Using Relative
and Absolute Addressing |
This document is part of a modular instruction
series in Computer Instruction. For more information, see the overview
or the list of modules in this series, W: World Wide
Web. This document has been used in the following classes: INP
150.
|
| History: |
Original: 22 October 2003
Last modification:
Thursday, 18-Nov-2004 21:45:16 EST
|
| Copyright |
Copyright © 2003, Laurence
J. Krieg, Washtenaw Community College
Instructors: You may point to this file in your Web-based materials; however,
its location may change without notice.
Students: You are welcome to make a copy for your personal use.
All other uses: Please contact the author, Laurence
J. Krieg, for permission: krieg@ieee.org.
|