1. Fill in the blank. _____ #cc00cc;
That's correct. Well done!
The correct code:
color:
Press Tab or click button to advance to next exercise.
2. When the color specification begins with #, how many more characters does it take to define the color? Answer with a numeral.
That's correct. Well done!
The correct answer:
6
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
3. Specifying the color of a stop signal, write the second line of a class definition, that is, the line that specifies text color.
That's correct. Well done!
The correct code:
color: red;
Press Tab or click button to advance to next exercise.
4. Rewrite the following code so it's correct.
  color: 0000ff;
That's correct. Well done!
The correct code:
color: #0000ff;
Press Tab or click button to advance to next exercise.
5. Drag-and-drop: Holding down the left mouse button, drag the pieces of code onto the screen to create a class of heading named "standout"
6. Click in the box and type the next character. I'll autocomplete. Don't type spaces or carriage returns. When the exercise is complete, I'll turn the exercise number green.
Create a class not tied to an element named "subdued" that colors text brown.
That's correct. Well done!
Press Tab or click button to advance to next exercise.
7. Fail-safe coding. If you type the wrong character, I'll cancel the keystroke. Type spaces. When the exercise is complete, I'll turn the exercise number green.
Create a class of paragraphs named "bright" that colors text #8b008b.
Press Tab or click button to advance to next exercise.
That's correct. Well done!
8. Create a class that isn't tied to an element that specifies any color you like. Create the color specification by using any combination of numbers 0 through 9 and a through f. Don't worry about what the actual color is. Make up the class name.
That's correct. Well done!
Example:
.conspicuous {
color: #2572ff;
}
Press Tab or click button to advance to next exercise.
9. Create a class of heading (your choice of size) that specifies CadetBlue for the text. (Mashing the two words together without a space isn't a typo. That's the name you need to use.) Make up the class name.
That's correct. Well done!
Example:
h6.showoff {
color: CadetBlue;
}
Press Tab or click button to advance to next exercise.
10. Write a paragraph including opening and closing tags and some text, assigning it the class "full_color".
That's correct. Well done!
Example:
<p class="full_color">This is how you do it.</p>
Press Tab or click button to advance to next exercise.
11. Create a class that can be used for a section of text that specifies a common color by name. (HTML recognizes any color name that a typical 4-year-old knows.) Make up your own class name.
That's correct. Well done!
Example:
.primary {
color: green;
}
Press Tab or click button to advance to next exercise.
12. A class has been created specifying red text. Code a paragraph of more than 1 word that includes the word "red" and colors that word (and only that word) red. The class name is "shocking"
That's correct. Well done!
Example:
<p>This is what <span class="shocking">red</span></p>
Press Tab or click button to advance to next exercise.
The next several exercises are timed. If you type slowly or dislike time pressure, feel free to increase the allotted time.
13. Time goal: 30 seconds. Create a class of paragraphs named "bright" that colors text #8b008b.
Press Tab or click button to check answer.
The correct code:
p.bright {
color: #8b008b;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
14. Time goal: 35 seconds. Create a class that isn't tied to an element that specifies any color you like. Create the color specification by using any combination of numbers 0 through 9 and a through f. Don't worry about what the actual color is. Make up the class name.
Press Tab or click button to check answer.
Example:
.conspicuous {
color: #2572ff;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
15. Time goal: 35 seconds. Create a class of heading (your choice of size) that specifies CadetBlue for the text. (Mashing the two words together without a space isn't a typo. That's the name you need to use.) Make up the class name.
Press Tab or click button to check answer.
Example:
h6.showoff {
color: CadetBlue;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
16. Time goal: 50 seconds. Write a paragraph including opening and closing tags and some text, assigning it the class "full_color".
Press Tab or click button to check answer.
Example:
<p class="full_color">This is how you do it.</p>
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
17. Time goal: 30 seconds. Create a class that can be used for a section of text that specifies a common color by name. (HTML recognizes any color name that a typical 4-year-old knows.) Make up your own class name.
Press Tab or click button to check answer.
Example:
.primary {
color: green;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
18. Time goal: 65 seconds. A class has been created specifying red text. Code a paragraph of more than 1 word that includes the word "red" and colors that word (and only that word) red. The class name is "shocking"
Press Tab or click button to check answer.
Example:
<p>This is what <span class="shocking">red</span> looks like.</p>
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
19. Access this live coding exercise at JS Fiddle. When you've completed the exercise, close the JS Fiddle window, and you'll be returned to this page. (If JS Fiddle displays a warning message saying that your changes will be reset, click Leave this Page.)
Click button to advance.
20. Access this live coding exercise at JS Fiddle. When you've completed the exercise, close the JS Fiddle window, and you'll be returned to this page. (If JS Fiddle displays a warning message saying that your changes will be reset, click Leave this Page.)
Click button to advance.
Post a review on Amazon for the paperback or the Kindle edition.
Email me to give me a compliment, complaint, or correction. I'll respond.
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
1
0