Cascading Style Sheets
Week Three


~Selectors and Other Properties~




Answers to the quiz:
1. What is the difference between div and span tags?
      The div tag is a block level element used to define the style of a division or section of the page. The span tag set is an inline element, used to apply style to a small section of the page, even a section as small as one word or one letter.

2. An example of a class selector would be the following code in my linked style sheet:
       .first-letter {color:#CE007B;
       font-weight : bold;
       }
In the body of my page, I would use the following HTML code:
<span class="first-letter"> M </span>        M aking the first letter of a sentence a different color and weight from the rest of the sentence. This week's lesson is taxing my brain a little more than usual. I hope I don't get a migraine! LOL


3.What is the flag character for the ID selector?
      The flag character for the ID selector is the # sign.

4.True or False: A combined selector will work in any element. Why or why not?
      False. A combined selector will only work if the element meets both or all requirements of the selectors.

      This paragraph will look a little different, because its combined selectors are different from the ones for the regular paragraph below.

      Here's a regular paragraph, a rather short one at that. It has just one sentence, to illustrate the different attributes of the selectors.



5. True or False: Line height properties can only be used with inline style.
      Line height properties can be used with both inline style and and classes. For this particular example, I have used classes to specify a double spaced line. I really find all these formatting methods quite fascinating and my ambition is to be able to remember them all and use them again someday!

6. True or False: The span tag is used to create style for a whole section of your page. Why or why not?
      Hmmm, this is tricky. The span tag is used to apply style to a smaller section of the page, even as small as one word or one letter.

God Bless America!
God Bless America!
God Bless America!

American Flag
LVS Homework Pages

Valid HTML 4.0!