CODE TO TYPE:
<title> My Home Page </title>
<h1>Welcome to My Home Page</h1>
My favorite live rock bands:
. Your page should have a light grey background now.
You're probably thinking that CSS looks a whole lot different from HTML. That's because it's a whole different
language! But don't worry, I have every confidence that you'll be able to learn it. We'll go into a lot more detail about
CSS later, but for now, keep these facts in mind:
Within the <style> element, body is the selector. It "selects" the element in your page to be styled. In this case, we
selected the body to style, so the background of the entire page changed color.
background-color is the property name. This is the style property you're specifying. There are lots of properties you
can use to style your elements.
#d9d9d9 is the property value. This value changes the style of your element. In this case, the property value is a color.
I know—it doesn't look like a color, but it is. (More on that subject in a minute).
The property name and property value are separated by a colon (:). At the end of the line is a semicolon (;). Don't forget
the semicolon (;)! It's a common mistake and if you make it, your CSS won't work. If you run into problems, check to
make sure your semicolons are in order.
All of the CSS is contained in the <style> element. This is typically where you'll put your style, but you can also add
style directly to an element, or put all your style into a separate file altogether. (You'll see how to do this later too.)
So, how do you think you'd set the background color of the ol element? Here's a hint: the color code for white is: #ffffff.
The six characters following the # are the hexadecimal representation of the colors red, green, and blue. To get other
colors, all you have to do is change each character to one of sixteen values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
Try changing these characters and see what kind of colors you can make. The first two characters determine how much
red is used. If you do not want any red in the color, set the value of the first two characters to 00. If you want to
incorporate just a little red, then the value to use would be 01. A little more? Use 02! You get the idea.
The second two characters determine how much green will be used, and the last two characters determine how much
blue will be used.
If you want a bright red color, you would want to use the most red possible (and the least amounts of blue and green),
so you would use #ff0000.
If you want less red, you might use #770000.
Now that you know more about colors, let's experiment a bit. Try setting the background color of the page to other