CPSCI 105: Explorations in Computer Science
Lab 6
February 8, 2007
XHTML
Today we'll make the transition from HTML to XHTML.
To serve as a basis for discussion, here is the
smallest possible valid XHTML file.
(If you take the previous link, you won't see anything. Why not?)
We'll also discuss validation. Here's a link to the
W3C validator.
Finally, we'll discuss the concept of a template and then get some practice using one.
Stop! Do not start the next section until I tell you to do so.
Website Maintenance
-
Log in to your account on warp
and make public_html your working directory.
-
There are some useful files I want you to have copies of.
Create a directory named img in the working directory.
Change its permissions so that it will be accessible to the web server.
Then copy every file whose name begins with ‘w’ from the directory
/home/public/web-authoring/img/ to this new directory:
cp /home/public/web-authoring/img/w* img/
-
Next, copy the file template.html
from the directory /home/public/web-authoring/ to the
working directory, naming it (of course) template.html.
Edit the template, typing your name as the author in the <address>
element. Save the file, exit emacs, and make your new template file read-only.
(Why is this a good idea?)
-
We're going to use the template to create a new homepage. But first,
save your current homepage by renaming it old.html.
(Use this exact name—I need to be able to find this page to grade
your Homework 4 assignment.)
-
Create a new homepage using the template, naming it (of course) index.html.
Type your name in the <title> element and in the <h1>
element of this file.
-
Open your new homepage in a web browser. Run it through the XHTML
syntax validator by using the link at the bottom of the webpage.
Correct any mistakes.
Homework 5
-
Use the XHTML template file to create a file about.html in
public_html. It should contain a paragraph of
information about you. This should be a serious paragraph.
(Our clients will most likely read these.)
Include whatever information you think would be useful for someone
who's interested in assessing the quality of your posted content.
Run the page through the validator and make any necessary
corrections.
-
Use the template to create a file usability.html
in public_html. Insert the contents of the
website review document you created for part 3 of
Homework 2.
Mark up the content using appropriate XHTML tags.
Run the page through the validator and make any necessary
corrections.
-
Use the template to create a file michalko.html
in public_html. Insert the contents of the
disability studies document you created for part 4 of
Homework 2.
At this point, you should also have read chapter 3 of
The Two-in-One, so add a summary and reflection
paragraph for chapter 3 to this document. (Re-read the original
assignment if you don't know what I mean by ‘summary’
and ‘reflection’ paragraphs.)
Mark up the content using appropriate XHTML tags.
Run the page through the validator and make any necessary
corrections.
-
Create an unordered list on your new homepage.
Preface the list with a level-2 heading Homework.
The list should contain two elements: a hyperlink to
usability.html and to michalko.html.
Do not use the filenames as the content of these source anchors;
instead use descriptive text (e.g., “Website Reviews”).
This asssignment is due at the beginning of
class on Tuesday, February 13.
[ Return to the CPSCI 105-01 homepage ]
Brian J. Rosmaita <contact me>
This page was last modified Thursday, 8 February 2007 at 05:09 UTC.