CS142 Project #1: HTML and CSS

Problem 1 (10 points)

Create a single HTML document that presents two different appearances, determined by the document's CSS stylesheet. Your HTML file should be called p1.html and the two stylesheets should be called p1a.css and p1b.css. If the HTML file links to p1a.css then it should appear like this ("Version A"), assuming you are running Chrome 26.0.1410.43 on a MacOS machine:

Windows screenshot for Problem 1a

If the HTML file links to p1b.css then it should appear like this in Chrome 26.0.1410.43 on MacOS ("Version B"):

Windows screenshot for Problem 1b

On other platforms you may see a slightly different appearance, due to font differences. Here are the corresponding screen dumps for a few other platforms:

Here are some additional details and requirements for this problem:

Problem 2 (10 points)

Create an HTML file p2.html and its corresponding CSS file p2.css, which will create a set of tabs that appear like this on MacOS with Chrome 26.0.1410.43:

Windows screenshot for Problem 2

For the corresponding appearance on Windows 7 with Chrome 26.0.1410.43, click here

In your solution for this problem you must use images in conjunction with the background-image CSS attribute to create the appearance of the tabs. We have generated 6 images for you to use. For tabs that are not selected there are three images, one for the left edge of the tab, one for the middle, and one for the right edge. There are three different images to use for the selected tab. Here are the images:

left.gif
mid.gif
right.gif
left-selected.gif
mid-selected.gif
right-selected.gif

To make a copy of any of these images for use in your solution, right-click over the image in Chrome and select "Save Image As...".

Here are some additional details and requirements for this problem:

Problem 3 (5 points)

Create a simple mashup page that displays both the New York Times news page (http://www.nytimes.com) and the San Jose Mercury News home page (http://www.mercurynews.com). Your solution should be in a file p3.html. Note: your solution for this problem does not need to validate (there are validation errors in the New York Times and Mercury News pages, sigh). If you have any style information in your solution, place it in a separate CSS file.

Style Points (5 points)

These points will be awarded if your XHMTL is clean and readable, Problems 1 and 2 pass validation (both for XHTML and CSS), and your solutions for Problems 1 and 2 are reasonably close matches to the samples.

Extra Credit (5 points)

To earn these extra credit points, you must make your solutions to Problems 1 and 2 "pixel perfect" matches to the corresponding sample images for your machine type. You should be able to achieve exactly the same spacings, colors, and fonts as in the sample images.

Resources

Hints

Deliverables

Use the standard class submission mechanism to submit all of the files needed to display the pages for Problems 1-3, including p1.html, p1a.css, p1b.css, p2.html, p2.css, all of the images for the tabs, and p3.html.