Bubbles!

CSCI 100 - Homework 5Coloring, coloring, coloring

Due before midnight, Thursday 15 Mar 2007

In this assignment you will be creating 2 CSS style sheets and pages to demonstrate them. You should validate both the HTML or XHTML and the CSS pages.

Remember, I've put template HTML and XHTML files on the web.

Feel free to use them as starting points.


As requested in class, here is a page that has color names with samples and hex values: http://www.w3schools.com/html/html_colornames.asp

Part 1 - Making folders

Make a folder called hw05. Inside it create 2 subfolders, pages, and css.

If you decide to add in images and thumbnails, also create images, and thumbs and use them as we did in the previous assignment.

Part 2 - Picking out your colors

I want you to come up with 2 color schemes and create CSS files that demonstrate them. One of them has a pre-set theme, and you are to come up with your own for the other.

Required Styles

Here are some ideas for your free form choice of style:

You can also find ideas at some of the following sites:

However, I don't just want you to just come up with a random color scheme. You should organize around a "theme" of some sort such as those above. I want you to include a description of that theme in a comment at the start of your CSS files along with at least your name.

Recall that to create a comment in CSS you enclose it in markers:

    /*
           This is an example of a CSS comment. 
     */
    

Requirements

You will need to do at least the following for each style sheet (and demonstrate them in the HTML page):

  1. Change the background color for the page <body>
  2. Change the foreground color for the page <body>
  3. Set the coloration for the following tags:
  4. Create at least one class for a paragraph that is visually different (background at least, probably foreground too)

You might want to use the special background-color transparent to un-color a background.

CSS rules

Recall that we discussed that CSS rules are composed of three components:

  1. Selector
  2. Property
  3. Value

And look like this:

        p {
            color: #0000FF;
            background-color: #FFFF00;
        }

And a class can be done like this:

        p.reverse {
            color: #FFFF00;
            background-color: #0000FF;
        }

You only need to use the properties color and background-color.

Extra credit

For a small amount of extra credit, create rules for nested structures. You do this by listing two selectors next to each other (without a comma).

        .reverse em {
            /* your style here */
        }

Which is a CSS rule that applies to <em> tags inside anything that is in the reverse class.

        em em {
            /* your style here */
        }

Applies to nested emphasis tags, and so forth.

You can also try out some other types of selectors such as children, sibling, etc. See pages 640-641 in "Head First HTML".

Part 2 - Create pages and CSS

You need to create 2 pages, one for each color scheme. Put the HTML file in your pages folder. and the accompanying CSS file in the css folder.

Naming

For sanity's sake, let's use this naming convention. Both files have the same prefix and differ in suffix. So you should have:

Content

You can put anything you would like onto these web pages. However, you'll make it easier to grade if you include descriptive text explaining each part. (E.g., this is emphasis text and this has strong emphasis).

You can also generate random text to help fill out your page using the Lorem Ipsum generator.

Part 3 - Making index pages

Now you need to create an index.html file in your hw05 directory. Include in it links to to the 2 pages you created. You can style this with CSS if you want.

Honor Code

If you followed the Honor Code in this assignment, insert a paragraph attesting to the fact within this file as well.

I affirm that I have adhered to the Honor Code in this assignment.

Update index.html

Update your index.html file in your csci100 directory with a link to this assignment.

Part 4 - Validate

Be sure all (X)HTML files are validated as either 4.01 Strict or XHTML 1.0, and all CSS files are valid CSS.

Part 5 - handin

Upload, set permissions, and so forth. You now just need to electronically handin all your files.

  1. either ssh into cs.oberlin.edu or start a terminal from a lab machine
  2. cd ~/www/csci100
  3. handin -c cs100 -a 5 hw05

If you are using Terminal you can just do this as one command:

    ssh username@cs.oberlin.edu handin -c cs100 -a 5 www/csci100/hw05

Wow! Web pages in Wonderful color!


Last Modified: March 08, 2007 - Benjamin A. KupermanVI Powered