CSci 1101 Lab 1. Due Tuesday, February 2 at 11:59pm
Goals of this lab:
- Introduction to your computer science lab computer accounts.
- Introduction on how to edit your
files on the server (csci1101sp10).
- Introduction to the file system and basic LINUX commands.
- Practicing the basics of HTML/XHTML.
Tasks for the lab:
- Log in to a lab machine. Use the same login that you used for the
blog. The password is the same as your initial password for the
blog. I can remind you your password if you forgot.
- Go to the menu Applications -> Internet and find the icon for Firefox browser. Press the right mouse button over the icon and select "Add to launcher". This will add it to the tools panel on top.
- Go to the menu Applications -> System Tools, choose Terminal and also add it to the panel. Double-click on it to open it.
- Start Firefox by either double-clicking on its icon or by typing
firefox &
in the terminal window. Go to the page http://cda/~elenam/1101_spring10/psets/lab1.html; this will bring you to these lab instructions.
Note that Firefox may take a while to start so you might want to continue your work while it is starting up.
- Now you need to change your
password. Type passwd in the terminal window. You will be
asked to type in your current password and then your new password
twice. As you are typing the password, nothing will show up on the screen -- that's a security measure and is OK.
Your new password must have at least two different kinds of
symbols, such as letters, digits, and punctuation marks. Make
sure to remember your new password. It's OK to write it down somewhere in your notebook, you can discard that page later after you have memorized your password. Don't write your password in an e-mail message or any electronic format and don't share it with anyone.
- You also need to change your password on the server csci1101sp10. To do this: in the same
terminal window type
ssh csci1101sp10
. If a message appears
warning you that authenticity of the server cannot be established and
asking if you would like to continue connecting, answer "yes" (not
just "y").
When prompted for a password, type in the password
that was given to you in class (not the new one that you just set).
After you connect to csci1101sp10 type
passwd again and change the password to a new one (it may
be the same one that you use on the lab machines or a different
one). Type logout
when you are done to quit ssh.
Saving the web page:
- In your terminal window type
cd public_html
- In the browser go to the web page example first_page.html
(note that the page name has an underscore in it);
view the page source (View -> Page Source or Ctrl-U).
- Type
jedit &
(all lower case) at the command
prompt to start the text editor jEdit.
- Copy/paste the page source into the jEdit window and save it as
first_page.html
in public_html
- Open a new tab in the browser (File -> New Tab or Ctrl-T) and type in
http://csci1101sp10.morris.umn.edu/~yourloginname/first_page.html
(replace yourloginname with your login name). Make sure the
page shows up. Note that it does not have any images yet.
- At the command prompt create a directory (folder)
images
by
typing mkdir images
. Alternatively you can go into your "home" folder
on your Desktop, open public_html
, and create a new folder images
.
- Save the images from the web page into the folder
images
- Reload the page, check that the images show up.
- Validate this page by copy/pasting its URL into XHTML validator. Caution: the URL
should contain the full domain name of the server:
csci1101sp10.morris.umn.edu
(using just csci1101sp10
would work for viewing pages in the lab, but will not work in the
validator).
Changing the web page
In this part of the lab you are asked to experiment with the given web
page. You need to follow these guidelines:
- Edit the file on your lab machine (in jEdit window). Save the file.
- Reload it in the browser. Holding the
shift
key while you are
refreshing the page tells the server to update all the files used for
this page. While it may not be necessary at this point, it's
a helpful thing to know for the future, so keep this in mind.
- Check your page using the XHTML
validator. If it's not XHTML-compliant, correct the mistake. Note that the
second to last item in the list of tasks fails XHTMl validator, that's OK. However, there
should not be any other errors.
- Use W3 Schools HTML tutorial to look up tags.
- When you are done, make sure to save the file, then go to
System -> Log out to log out of the lab machine.
- If there is anything you don't understand or if would like to know
more, please ask right away!
Here are the features of the web page that you need to change
for this lab:
- Add a paragraph anywhere in the page. The text can
be anything, it doesn't have to be
related to the topic of the page. Use a
strong
or em
tag for a part of the text inside the paragraph.
- Add a line break anywhere in your new paragraph.
- Change the first list in the page to be ordered; don't forget to change the closing tag as well.
- Change one of the headers in the page to a different level (say,
h4 to h3).
- Add a
link to any web site using
a
(anchor) tag. Make sure that your page is still
XHTML-compliant.
- Change the width or height of any image in the page.
- Make one of the images into a link (to any web page) by nesting it
inside the
a
(anchor) element.
- Set the
width
and the size
attributes of
the <hr>
element. Note that these attributes are
not XHTML-compliant, that's OK for this lab.
- Avoid physical style tags (such as <b>). Don't use
style
attribute
(I'll explain this later in class).
Please feel free to change more page elements than listed here, the more you
try - the better.
How to submit this lab
You have untill 11:59pm on Tuesday, February 2 to finish this
lab. You don't need to submit anything, simply leave your web page on
the server. Don't change anything in it after the deadline until you
get the grade (by e-mail). If you would like to experiment with HTML further,
simply make a copy of the HTML file with a different name.
If you have any questions, please come to my office hours or e-mail
me.
This page is a part of CSci 1101
course web site.