CS1102 Lab 3

This week's work

(My thanks go to the fine men and women of the National Weather Service Forecast Western Region Headquarters in Salt Lake City for their description of rainbows, which I have adapted for use in this worksheet.)

This lab helps you to master CSS selectors. Put your work in a new folder called lab3 (all lowercase), which you should create inside your cs1102 folder.

The following content is provided:

Download rainbow.html and save it in your cs1102\lab3 folder. It contains a couple of tags that we haven't covered but that should not be a problem in tackling this lab.

Important. For this lab, you must not modify rainbow.html.

In your lab3 folder, create a CSS stylesheet, rainbow.css (all lowercase) that causes rainbow.html to appear as it appears in rainbow.jpg.

The smaller your stylesheet is, the better!

You only need to set the color and background-color properties. And the colours I have used are: black, white, red, purple, fuchsia (the pink colour), lime (the green colour), blue and aqua (the green-blue colour).

It might be nice if you validated your CSS, like you did for lab 2: http://jigsaw.w3.org/css-validator/.

Deadline: 1pm, Tuesday 30th October (due to the public holiday).

Submit rainbow.css in the usual way, this time selecting LAB3 when prompted.

Challenge exercise

Remember, challenge exercises are always optional. They do not form part of your year's work and they are not worth any marks. They are designed for those students who finish the main exercise quickly and easily, and wish to explore further.

This challenge is to find the shortest stylesheet that can do the job.

We'll make this a competition. If you think you've got a potential winner, then email me your stylesheet by the deadline. The shortest will win one of my worthless book vouchers. You can interpret short in one of two ways: fewest rules or fewest characters. As usual, judge's decision (my decision) is final.