1. To style the second-largest heading that goes inside the header div, fill in the blank.
div#header __ {
That's correct. Well done!
The correct code:
h2
Press Tab or click button to advance to next exercise.
2. To style the third-largest heading that goes inside the div with an ID of "banner", fill in the blank.
__________ h3 {
That's correct. Well done!
The correct code:
div#banner
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
3. To style paragraph text that goes inside the header div, fill in the blank.
div#header __ {
That's correct. Well done!
The correct code:
p
Press Tab or click button to advance to next exercise.
4. Type the character that's missing in this code.
background-color: 000000;
That's correct. Well done!
The correct code:
#
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 style the font-family and color of a heading inside a div.
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.
Code the line that moves a heading right by 2%.
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.
Code the line that doubles the "normal" size of text.
Press Tab or click button to advance to next exercise.
That's correct. Well done!
8. Code the first line that styles a heading (your choice of size) within a div with the ID "header".
That's correct. Well done!
Example:
div#header h2 {
Press Tab or click button to advance to next exercise.
9. Code the first line to style paragraph text inside a div. Make up the ID of the div.
That's correct. Well done!
Example:
div#masthead p {
Press Tab or click button to advance to next exercise.
10. Style text (your choice of heading or paragraph text) inside a div (your choice of ID), assigning it a hex color. Hex values can be expressed in numbers are letters a through f.
That's correct. Well done!
Example:
div#banner h5 {
color: #0f0f0f;
}
Press Tab or click button to advance to next exercise.
11. Code the first line of styling for an h3 heading inside a div whose class is "special".
That's correct. Well done!
The correct code:
div.special h3 {
Press Tab or click button to advance to next exercise.
12. Style an h2 heading inside a div. The heading has some whitespace on the left and is maximum bold. Make up the ID of the div and the amount of whitespace. Use a number to specify the bold.
That's correct. Well done!
Example:
div#header h2 {
margin-left: 3%;
font-weight: 900;
}
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: 15 seconds. Code the line that doubles the "normal" size of text.
Press Tab or click button to check answer.
The correct code:
font-size: 2em;
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
14. Time goal: 20 seconds. Code the first line that styles a heading (your choice of size) within a div with the ID "header".
Press Tab or click button to check answer.
Example:
div#header h2 {
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
15. Time goal: 15 seconds. Code the first line to style paragraph text inside a div. Make up the ID of the div.
Press Tab or click button to check answer.
Example:
div#masthead p {
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
16. Time goal: 35 seconds. Style text (your choice of heading or paragraph text) inside a div (your choice of ID), assigning it a hex color. Hex values can be expressed in numbers are letters a through f.
Press Tab or click button to check answer.
Example:
div#banner h5 {
color: #0f0f0f;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
17. Time goal: 20 seconds. Code the first line of styling for an h3 heading inside a div whose class is "special".
Press Tab or click button to check answer.
The correct code:
div.special h3 {
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
18. Time goal: 60 seconds. Style an h2 heading inside a div. The heading has some whitespace on the left and is maximum bold. Make up the ID of the div and the amount of whitespace. Use a number to specify the bold.
Press Tab or click button to check answer.
Example:
div#header h2 {
margin-left: 3%;
font-weight: 900;
}
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