Exercise 2
Create a Page, Upload, and Validate
Resources for this exercise:
- See the Course Schedule for due date. Exercises are due before the beginning of class on the due date.
- See the Homework Frequently Asked Questions (FAQ) page for answers to questions about homework exercises.
- See The Process of Creating, Publishing, and Validating a Web Page.
- See the How to Name Files and Directories page. Failure to follow proper naming conventions will result in lost credit.
- See the Our Class Web Server page for information on the server.
- See the HTML & Web Design: Learning Aids section of the Resources page for information on basic HTML tags.
- See the How to Upload to Webhawks.org with Fetch (Macintosh) and How to Upload to Webhawks.org with CoreFTP (Windows) for information on uploading.
- See the Logins and Passwords Worksheet page for your logins and passwords.
Note: I've created an HTML template to make it easier to do this exercise. I recommend first trying to do this exercise without using the sample code of the template. But if you need more help in trying to figure out how to code this first coding exercise, feel free to use the code from the template.
1) Using a basic text editor (such as TextWrangler on Mac OS X, or Wordpad on Windows) create an HTML document. This page will become your home page.
Mac OS X users note: the text editor that comes with OS X, TextEdit, is not
good for editing HTML documents, because it wants to save in RTF format. TextWrangler,
a Mac text editor, is free. It can be downloaded from:
http://www.barebones.com/products/textwrangler/index.shtml
Note that the current version, 2.2, requires OS X 10.4.
The earlier version, 2.1.3, requires OS X 10.3.5. It can be downloaded from:
http://www.barebones.com/products/textwrangler/download_2_1_3.shtml
2) This page must display a headline (in an <h1> tag) that
states your full name.This should be the very first line in
the <body> section. It should say something like "John
Sky's DM60A Home Page".
3) Following this headline will be a sub-headline (in an <h2> tag)
that says "My Web Design Experience".
4) Following this sub-head will be one or more paragraphs (literally coded
as paragraphs, using <p> and </p> tags)
that indicate your Web design experience.
5) Following this paragraph will be another sub-headline (in an <h2> tag)
that says "My Personal Goals for This Course".
6) Following this sub-head will be one or more paragraphs (literally coded
as paragraphs, using <p> and </p> tags)
that indicate your personal goals are for the course.
Don't add other stuff to this page right now; keep it simple and plain. You'll add more to it later. This page will become your home page for the class, and will eventually include your photo, and links to all your exercises. The most important thing now is not to make the page look pretty, but to use proper structural markup that validates.
7) This page's <title> must indicate that this is your
home page for your class work, so it should say something like "John Sky's
DM60A
Home Page".Remember that the <title> always must be
in the <head> section.
8) Add the HTML 4.01 Transitional DocType that will enable you to use an HTML
validator (as explained in How to Use
the W3C HTML and CSS Validators).
Make sure you use the code for HTML 4.01
Transitional, not XHTML 1.0 Strict. First, at the very beginning of your
document, before the <html> tag,
place this line of code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
9) This page must contain links (either buttons or text links) to the HTML and CSS validators. See How to Put HTML and CSS Validate Buttons on Your Page for information on how I want you to to do this. Make sure you use the code for HTML 4.01 Transitional, not XHTML 1.0 Strict. (Use the block of code on this page to make the button links or text links, so that clicking on the links automatically lets you know if the page validates or not.)
10) In summary, this page must correctly demonstrate the use of the following tags:
| Description | Tag |
|---|---|
| document type declaration (DTD) | (see step 8 above) |
| HTML document | <html> |
| head section | <head> |
| title | <title> |
| body section | <body> |
| heading 1 | <h1> |
| heading 2 | <h2> |
| paragraph | <p> |
11) Save this file as a text-only file, and when you save the file name it "index.html". Make sure you name it exactly as it says: the words "index" and "html" with a period between them, with no spaces and no capitals.
12) Upload this page to your folder on the webhawks.org server.
See the How to Upload to Webhawks.org with Fetch (Macintosh) and How to Upload to Webhawks.org with CoreFTP (Windows) for information on uploading.
13) View your page (the page on the server, not the page on your disk) in a Web browser:
Go to:
http://webhawks.org/~yourusername
to view your exercise 2 page (your home page).
Or, to make it easier, you can always get to your home page by going to the Student Sites page for our class.
14) Make sure the HTML on this page validates (using the HTML 4.01 Transitional DTD) with no errors, according to the W3C's online HTML Validator at http://validator.w3.org/. You can easily do this by clicking on your HTML validator button. For more information, see How to Use the W3C HTML and CSS Validators for step-by-step directions.
15) If you have used any CSS*, make sure the CSS on this page validates, with no errors, according to the W3C's online CSS Validator at: http://jigsaw.w3.org/css-validator/validator-uri.html. You can easily do this by clicking on your CSS validator button. See the CSS section of How to Use the W3C HTML and CSS Validators for step-by-step directions.
*We will learn CSS later in this course. Please do not use CSS until then, unless you have previously learned CSS, and can use it correctly and it validates.
16) If there are any errors, fix them, re-upload the page, and validate it again.
17) Submit the feedback form. To receive full credit for this exercise you must submit the feedback form before it expires. This exercise is due on 6/24/08. Allowing for a one-day grace period, the form will expire at the end of the day following the due date, which means the form for this exercise will expire at 12:00 AM on 06/26/08.