ATTEMPTING EASIER THINGS
As usual, if you have a problem, raise your hand. When you are done,
come to the TA or instructor and make sure you have your completion
of the lab recorded. Before you go, always log off your machine.
TABLES FULL OF COLOR
1. Open notepad, and put in a bunch of lines like:
<TABLE width=100 height=10>
<TD bgcolor=green></TD>
</TABLE>
which should show up as:
in the browser.
2. Go online and find other colors you can use in a browser.
3. Add ten more tables to your page using different colors.
Order your colors so they make sense as a selection
from a rainbow.
Show the TA.
Ha ha ha. Good test for your TA's eyes.
4. If you put multiple TD cells within a table, you can get
colors side-by-side.
Try it.
Make a color matrix that has 5 rows and 5 columns,
and has a different color in every cell.
You have TWENTY-FIVE colors to choose. Choose well.
5. You don't have to use predefined colors.
For a color, you can say something like 990050,
which is 99 in the red channel, 00 in the green channel,
and 50 in the blue channel.
Try it.
Is 999999 white?
No, but ffffff is white.
Is 000000 black?
Show me a table with 10 rows, each of which is a different
shade of gray.
6. If you had extra fingers on your hand, you would count
0, 1, 2, 3, ..., 9, a, b, c, d, e, f,
where f is 15.
As you are, you can count 0-9 on your fingers, and you
can represent two-digit numbers by counting on your toes
as well as your fingers. Morons would count to 20, but
you would use the big toe to represent TEN, and the
next toe to represent TWENTY, and so on.
(Or if you're really smart, you would count in binary
all the way up to 2^20 - 1, but let's not talk about that.)
If you had six extra fingers, you could represent two-digit
numbers on your toes where each toe is worth SIXTEEN.
So it is with hexadecimal notation. After 09, we go to 0a,
then up to 0f, then 10. But 10 in hexadecimal is actually
16 in base ten. It's one big toe. Then 10, 11, 12, ..., 19,
1a, 1b, 1c, 1d, 1e, 1f, 20. 20 in hexadecimal is 32 in base
ten, i.e., two toes, each worth 16.
It's harder to talk about than to do.
Suffice to say that f0 is pretty darned bright. ff is the
brightest, and it's equivalent to 256 in base 10. a0 is
not quit as bright as f0. aa is brighter, but much closer to
a0 than it is to f0.
You'll get the hang of it if you try it.
So ff00ff is all red and all blue, and no green, i.e., completely
magenta. And ffff00 is all red and all green, and no blue,
i.e., believe it or not, pure yellow.
See if you can tell the TA which is more yellow,
340912 or aa33ff. Try it.
7. Now, I want to see a 10x1 table of colors where each color is
of your creation, using rgb hexadecimal codes.
I want you, yes, to choose each color, one at a time.
That way, you can guess in your head how it is going to
look and see if you are surprised.
8. At the end of the table, in text, display ONE of the color codes.
Just choose one of your hexadecimal numbers and repeat
it as text, after the last table. If you want, you can
set it in bold.
9. Ask the TA to come over and guess which one of your rows is
the color you chose. If the TA guesses right, you are done!