1. If you want to use the class for headings as well as paragraphs, how would you rewrite this?
p.special {
That's correct. Well done!
The correct code:
.special {
Press Tab or click button to advance to next exercise.
2. Create a class named "fancy" that isn't tied to any element. Write just the first and last lines of the code
That's correct. Well done!
The correct code:
.fancy {
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
3. If the following code is in the CSS file, what is the "normal" size for paragraphs, compared with the browser's default size? Express it as a %.
p {
font-size: 1.5em;
}
That's correct. Well done!
The correct answer:
150%
Press Tab or click button to advance to next exercise.
4. If the CSS file says that "normal" text size is to be 150% of the browser's default text size and you create a class that specifies paragraphs of the class are to be 1.3 ems, what is the size of this text, compared with the browser's default text size? Express it as a %. Use the calculator if you need it.
That's correct. Well done!
The correct answer:
195%
1.5 * 1.3 = 1.95 = 195%
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 not tied to an element named "minimized"
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.
Write the HTML for the opening tag for an h4 heading of a class named "big"
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 not tied to an element that halves the "normal" size. The class name is "tiny"
Press Tab or click button to advance to next exercise.
That's correct. Well done!
8. Code the first line that defines a class not tied to any element. Give it a name of your choice.
That's correct. Well done!
Example:
.extra_big {
Press Tab or click button to advance to next exercise.
9. Create a class not tied to an element that displays in a font from the stack Bookman, serif. Give it any legal name you like.
That's correct. Well done!
Example:
.fancy {
font-family: Bookman, serif;
}
Press Tab or click button to advance to next exercise.
10. If the CSS file says that "normal" text is to be twice the browser's default size and you create a class that specifies paragraphs of the class are to be .75 ems, what is the size of this text, compared with the browser's default text size? Express it as a %. Use the calculator if you need it.
That's correct. Well done!
The correct answer:
150%
2 * .75 = 1.50 = 150%
Press Tab or click button to advance to next exercise.
11. Define a class that isn't tied to an element. Give it the class name of your choice and a font-size of your choice.
That's correct. Well done!
Example:
.custom_size {
font-size: 2em;
}
Press Tab or click button to advance to next exercise.
12. Code the HTML for a heading (your choice of size) including opening tag, some text, and closing tag. Assign it a class of your choice.
That's correct. Well done!
Example:
<h3 class="advert">Free Shipping!</h3>
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 named "fancy" that isn't tied to any element. Write just the first and last lines of the code.
Press Tab or click button to check answer.
The correct answer:
.fancy {
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
14. Time goal: 15 seconds. Write the HTML for the opening tag for an h4 heading of a class named "big"
Press Tab or click button to check answer.
Correct code:
<h4 class="big">
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
15. Time goal: 50 seconds. Create a class not tied to an element that halves the "normal" size. The class name is "tiny"
Press Tab or click button to check answer.
Correct code:
.tiny {
font-size: .5em;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
16. Time goal: 40 seconds. Create a class not tied to an element that displays in a font from the stack Bookman, serif. Give it any legal name you like.
Press Tab or click button to check answer.
Example:
.fancy {
font-family: Bookman, serif;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
17. Time goal: 35 seconds. Define a class that isn't tied to an element. Give it the class name of your choice and a font-size of your choice.
Press Tab or click button to check answer.
Example:
.custom_size {
font-size: 2em;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
18. Time goal: 40 seconds. Code the HTML for a heading (your choice of size) including opening tag, some text, and closing tag. Assign it a class of your choice.
Press Tab or click button to check answer.
Example:
<h3 class="advert">Free Shipping!</h3>
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