CIT 040 Index > Assignment 1

Assignment 1

This exercise shows you how to use the two computer environments that you will use in this class. You will:

  1. Set up your directories on Windows. This is where you will write your HTML documents.
  2. Set up your account on the UNIX server. This is the account you will use for testing your HTML files.
  3. Use the telnet program to set up your directories on UNIX.
  4. Use an editor to create a web page
  5. 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

  1. 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.
    1. Double click My Computer > D:
    2. 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!
    3. This creates a new folder. Double-click the public_html folder icon.
    4. From the menu bar, select: File > New > Folder and type the name images.
    5. From the menu bar, select: File > New > Folder and type the name assignments.
    6. 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

  1. 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.
    1. Select Start > Run > and type telnet and press Enter.
    2. Type open 205.155.157.53 and press Enter
    3. 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.
    1. Type mkdir public_html and press Enter.
    2. Type cd public_html and press Enter.
    3. Type mkdir images and press Enter.
    4. 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

  1. 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.
    1. Choose Start > Programs > Textpad
    2. 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>
    3. From the File menu, choose Save as, and name the file template.html
    4. 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>
    5. From the File menu, choose Save as..., and give the file the name assignment1.html
  2. Use a browser to look at your page.
    1. Start Explorer
    2. Type this into the location area:
      file:///D:/public_html/assignments/assignment1.html
    3. It should show the text with your name in the title bar, and the “My first page.” text in the body of the window.
  3. Modify your web page
    1. In the TextPad window, change the text from
      My first page
      to
      This page is assignment 1.
    2. From the File menu, choose Save
    3. 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.

  1. 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:
    1. Select Start > Programs > CuteFTP
    2. 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.
  2. Use a browser to look at your page.
    1. Start the browser
    2. Type this URL in the location area, replacing the italic text with your username:
      http://205.155.157.53/htmlxxx/assignments/assignment1.html
    3. It should show the text with your name in the title bar and “This page is assignment 1.” in the body of the window.