Assignment: HTML & Cascading Style Sheets

(This is a modification of an assignment by Patrick Young, at Stanford Univ.)

For this assignment do not use WYSIWYG editors (e.g., no Dreamweaver). Webpages should be laid out using CSS floats (no HTML tables or CSS absolute positioning). You will be submitting several files to the drop box for this assignment. Several resources (images, text, etc.) are provided in a zip file, referenced at the bottom of this page.

Make sure your files validate at:
http://validator.w3.org/ (for HTML)
http://jigsaw.w3.org/css-validator (for CSS)

Your files should work on the latest version of Mozilla Firefox.

Part 1: A CSS'd Personal Page (12 points)

Create a simple personal web page, personal.html, that contains at least the following items:

  1. Your name at the top of the page as an <h1> heading.
  2. A few paragraphs about yourself. Be sure to include the word Eastern at least twice in your paragraphs—we’ll need that for the next problem in this assignment.
  3. A list of hobbies or interest displayed as an HTML unordered list.
  4. Link at least two of your hobbies or interests to websites related to those interests.

Here’s roughly what the webpage should look like:

Example of your personal page, not yet using CSS

Stick to semantic HTML only. (Semantic HTML are those tags that do not specify appearance directly, such as the <i> and <b> tags.) We’ll spice it up with some CSS in the next part of this assignment. You can find a list of HTML elements commonly considered semantic HTML here:

http://microformats.org/wiki/semantic-html

Feel free to add in some additional items to your personal website if you’d like, but there is a more open-ended opportunity to be creative later in the assignment.

Make sure your webpage validates (see the links at the top of this page). Save your file under the name personal.html. If you've not validated a document before, it's very simple. I suggest using the "upload" option, as your html file isn't on a web server yet, and so doesn't have a URL that you can provide to the validators.

Now add a CSS file called personal.css and reference it in your .html file.

Make the following changes and additions:

Here’s a sample screenshot (in the screenshot "Stanford" is in red, but we want to use "Eastern" in green, instead). Make sure your webpage validates without errors through both the HTML and CSS validators.

Example personsal web page, using CSS

Submit your personal.html and personal.css files to the dropbox for this assignment.

Part 2: Zebra Striping (8 points)

In a zebra-striped table, every other row is a different color. In this problem you’ll create a simple zebra-striped table using data on the Stanford undergraduate population. For this problem save your HTML file under the name zebra.html, and put your CSS directly into the HTML file using the <style> tag. Here is what your webpage should look like:

Example table that uses zebra striping

Your solution needs to display the following characteristics:

Here are a few implementation pointers.

Submit your zebra.html file to the dropbox for this assignment.

Part 3: An Example Blog (20 points)

For this problem, modify the file blog.html to use document-level stylesheets so that it is formatted nicely. The document already includes a number of class attributes. You'll need to provide a style for each class attribute. This is your opportunity to get creative on this assignment. Here are the minimum requirements for full credit on this part of the assignment:

I’ll be giving up to 3 bonus points for nicely styled blogs. I'll show the top 1-2 blogs in class. I’ve provided a jpeg of the Memorial Church before the earthquake (from Stanford University Archives) in case you want to add it to your page.

Submit your blog.html file to the dropbox for this assignment.

Part 4: Two Column Layout

Create following two-column webpage (the text are excerpts from the Stanford Report) using CSS float layout:

Example of two column layout

Save the file as two-column.html. Each column should be 400 pixels with 15 pixel margins. Use a font with serifs. The actual text is provided with this assignment’s downloads so you don’t have to type it in. This section will not be graded, so you do not need to submit this file.

Part 5: Four Column Layout

Reproduce the following four-column webpage (consisting of headlines from the Stanford Report) using CSS float layout:

Example of a four-column layout

Save it under the name four-column.html. Your webpage does not have to look exactly like mine, but it should contain four-columns, each column should be 200 pixels wide with 10 pixel margins. Use a font without serifs. This section will not be graded, and you do not need to submit this file.

Part 6: Combined Webpage (10 points)

Combine the last two parts of this assignment into a new file called combined.html. Here’s what your combined webpage should look like:

Example layout with two columns on top half, and four columns on bottom

Submit your combined.html to the dropbox.

Part 7: Organizational Web Page (25 points)

In this part of the assignment we will create a web page, organization.html, containing several layout components, including a header and navigational field.

Web page showing multiple layout components

The Bing Concert Hall text is an excerpt from the actual Bing Concert Hall website (binghall.stanford.edu) and, along with the Bing Concert Hall image file, is provided as part of the homework downloads, so you don’t need to type it in.

Your page doesn't need to be exactly as shown. If your measurements are different or your margins are a bit off or your fonts are a different size, you’ll still receive full credit. But the overall placement of items should be the same. Make sure you have the following features:

Here are some of the specific measurements used to generate the example web page. Again, you can use different values, so long as the layout is approximately the same.

If you use the <h1>, <h2>, and <h3> tags to create your headings (which is recommended), you’ll need to override the standard margins otherwise you headings will take up too much space. This is commonly done on professional webpages. In fact, many professionals use a “CSS Reset” with their webpages, which resets all the margin and padding on all HTML elements to 0px.

Submit your organization.html, along with any image files you reference therein.

Part 8: "Facebook" Page (25 points)

Create the following “Facebook-like” webpage, facebook.html. Here’s what the webpage should look like:

A web page that looks somewhat like what we might find on Facebook, or another social media site.

The webpage consists of a photo, some information about the person, and a set of "status updates". On the right, using form elements, the user is able to enter new updates, which will be added to the status updates shown in the center.

You don’t have to make a page for the dog Molly, you can substitute your own information, but don’t spend too much time thinking about this, we're only interested in the webpage layout, not its contents. Also if you enter your own material, make sure it stays at the PG-level or below – I will not grade any R- or X-rated websites.

While you do not need a pixel-perfect implementation you should include the following:

Submit your facebook.html to the dropbox, along with any image files it references.

Provided Resources

The following files are provided with the assignment download, assign1Resources.zip: