Assignment 1
This exercise shows you how to use the two computer environments that
you will use in this class. You will:
- Set up your directories on Windows. This is
where you will write your HTML documents.
- Set up your account on the UNIX server. This is the
account you will use for testing your HTML files.
- Use the
telnet program to set up your directories on
UNIX.
- Use an editor to create a web page
- Use the
FTP program to load your page onto UNIX.
You don't have to do this work on the school computers,
as long as the instructor can view your web pages. The instructor
can't come to your house and help you set up your computer; so you're
on your own if you decide to work somewhere other than at the school.
Use Windows and set up your directories
- Create directories to hold your web page work Be careful with capitalization and exact puntucation in the
names.This presumes you are using a Zip disk in the D:\ drive.
- Double click My Computer > D:
- From the menu bar, select: File >
New > Folder and type the name
public_html. That is an underscore between the
words. Do not type a blank!
- This creates a new folder. Double-click the
public_html folder icon.
- From the menu bar, select: File >
New > Folder and type the name
images.
- From the menu bar, select: File >
New > Folder and type the name
assignments.
- Close all the windows that opened during this process.
You now have a directory public_html in your
home directory (D:). In the
public_html directory, you have two directories:
images and assignments.
Use telnet and set up your directories on Unix
- Now use the
telnet program on Windows to connect with
Unix, and login with your own account. We will set up the
directories on UNIX in the same structure as on puma. That way,
we can build and test our files on puma, then copy them to the
corresponding directories on UNIX.
- Select Start > Run >
and type
telnet and press Enter.
- Type open 205.155.157.53 and press Enter
- Login with your user name and password, which your
instructor has assigned you.
In the following stpes, you will create the same directory structure on
UNIX as you did on Windows. When you first log in, the system may
require you to change your password.
- Type mkdir public_html and press Enter.
- Type cd public_html and press Enter.
- Type mkdir images and press Enter.
- Type mkdir assignments and press Enter.
The command cd in step two above means change
ddirectory. The command mkdir means make
directory. Be sure to put a blank after
the command, or it won't work.
Create a Web Page
- You will be using the Textpad program to edit files. We are
using it instead of notepad because it has features that make editing
your files far easier.
- Choose Start > Programs >
Textpad
- Type the following, as shown here. Put your name and the date in
the place where you see the italics. It is explained in the notes for
lecture 1.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Put a Title Here</title>
</head>
<body>
</body>
</html>
- From the File menu, choose Save as, and
name the file
template.html
- Now change the text in the title, and add the text in the body,
as shown here:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Written by E.V. College, 22 June 2002 -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Assignment 1 your name</title>
</head>
<body>
My first page
</body>
</html>
- From the File menu, choose Save as..., and
give the file the name assignment1.html
- Use a browser to look at your page.
- Start Explorer
- Type this into the location area:
file:///D:/public_html/assignments/assignment1.html
- It should show the text with your name in the title bar, and the
“My first page.” text in the body of the window.
- Modify your web page
- In the TextPad window, change the text from
My first page
to
This page is assignment 1.
- From the File menu, choose Save
- In the browser window, click the reload button.
When you have finished, you may close TextPad and your browser.
Use ftp to load your page onto UNIX.
- The
ftp (File Transfer Protocol) program is used to
copy files to or from servers. We create and test our pages on puma,
then we copy them to UNIX so that other students, the instructor,
and anyone else you wish can see your web pages there. To copy your
assignment1.html file to UNIX, use ftp:
- Select Start > Programs >
CuteFTP
- In the dialog box, select
Software Sites
and then click Add Site.
-
- For "Site label", type unix
- For "Host", type 205.155.157.53
- Type your user name and password in the appropriate
entries.
- Click OK
- Click Connect
- Click the OK button in the dialog box that
says you have logged on successfully.
- Navigate over to the
D: drive on the
left side of the window, then to the
assignments folder in the
public_html directory.
- Navigate to the
assignments folder in the
public_html directory on the UNIX side
(the right hand side of the window).
- Drag file
assignment1.html from the
left side to the right side, then click OK
when you are asked if you want to upload the file.
- Use a browser to look at your page.
- Start the browser
- Type this URL in the location area, replacing the italic
text with your username:
http://205.155.157.53/htmlxxx/assignments/assignment1.html
- It should show the text with your name in the title bar and
“This page is assignment 1.” in the body of the window.