1. What is the CSS term for specifying whether text is bold?
That's correct. Well done!
The correct answer:
font-weight
Press Tab or click button to advance to next exercise.
2. When you specify font-weight by a number, how many font-weights are there? Answer with a numeral.
That's correct. Well done!
The correct answer:
9
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
3. When you specify font-weight with a word, how many font-weights are there? Answer with a numeral.
That's correct. Well done!
The correct answer:
4
Press Tab or click button to advance to next exercise.
4. What number represents the boldest of the bold? Answer with a numeral.
That's correct. Well done!
The correct answer:
900
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 paragraph named "light" that has the lightest font-weight.
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 "normal," that specifies normal font-weight in terms of a number.
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 h3 headings that have the lightest font-weight. Name the class "lightest". Use a word to specify font-weight, not a number.
Press Tab or click button to advance to next exercise.
That's correct. Well done!
8. Create a class named "kinda_bold" that's not tied to an element. Make it two levels bolder than normal. Use a number.
That's correct. Well done!
The correct code:
.kinda_bold {
font-weight: 600;
}
Press Tab or click button to advance to next exercise.
9. Create a class of heading, your choice of size, whose font-weight is next-to-boldest. Choose your own class name. Use a word to specify the font-weight.
That's correct. Well done!
Example:
h5.prominent {
font-weight: bold;
}
Press Tab or click button to advance to next exercise.
10. Create a class that isn't tied to an element. Name it whatever you like. Give it normal font-weight. Use a number or a word.
That's correct. Well done!
The correct code:
.standard {
font-weight: normal;
}
or
.standard {
font-weight: 400;
}
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-weight of your choice, using a number.
That's correct. Well done!
Example:
.custom_weight {
font-weight: 700;
}
Press Tab or click button to advance to next exercise.
12. Create a class of heading (your choice of size). Make it as bold as possible, using a word. Make up the class name.
That's correct. Well done!
Example:
h3.black {
font-weight: bolder;
}
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: 40 seconds. Create a class of h3 headings that have the lightest font-weight. Name the class "lightest". Use a word to specify font-weight, not a number
Press Tab or click button to check answer.
The correct code:
h3.lightest {
font-weight: lighter;
}
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 named "kinda_bold" that's not tied to an element. Make it two levels bolder than normal. Use a number.
Press Tab or click button to check answer.
The correct code:
.kinda_bold {
font-weight: 600;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
15. Time goal: 40 seconds. Create a class of heading, your choice of size, whose font-weight is next-to-boldest. Choose your own class name. Use a word to specify the font-weight.
Press Tab or click button to check answer.
Example:
h5.prominent {
font-weight: bold;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
16. Time goal: 80 seconds. Create a class that isn't tied to an element. Name it whatever you like. Give it normal font-weight. Use a number or a word.
Press Tab or click button to check answer.
The correct code:
.standard {
font-weight: normal;
}
or
.standard {
font-weight: 400;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
17. Time goal: 40 seconds. Define a class that isn't tied to an element. Give it the class name of your choice and a font-weight of your choice, using a number.
Press Tab or click button to check answer.
Example:
.custom_weight {
font-weight: 700;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
18. Time goal: 35 seconds. Create a class of heading (your choice of size). Make it as bold as possible, using a word. Make up the class name.
Press Tab or click button to check answer.
Example:
h3.black {
font-weight: bolder;
}<
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