1. Fill in the blank to style a div that stretches from edge-to-edge.
width: ____;
That's correct. Well done!
The correct code:
100%
Press Tab or click button to advance to next exercise.
2. Fill in the blank to create a color block.
________: #003366;
That's correct. Well done!
The correct code:
background-color
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
3. Fill in the blank to eliminate whitespace above.
position: absolute;
top: __;
That's correct. Well done!
The correct code:
0
Press Tab or click button to advance to next exercise.
4. Fill in the blank to eliminate whitespace above.
________: absolute;
top: 0;
That's correct. Well done!
The correct code:
position
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 two aspects of a modern header.
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 forces the browser to place the div exactly where you want it.
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 eliminates whitespace on the left and right.
Press Tab or click button to advance to next exercise.
That's correct. Well done!
8. Code the line that creates a color block. Use any color name a child would recognize.
That's correct. Well done!
Example:
background-color: blue;
Press Tab or click button to advance to next exercise.
9. Code the line that eliminates the gap above the div.
That's correct. Well done!
The correct code:
top: 0;
Press Tab or click button to advance to next exercise.
10. Code the line that forces the browser to place the div exactly where you want it.
That's correct. Well done!
The correct code:
position: absolute;
Press Tab or click button to advance to next exercise.
11. Code the first line for styling a header section. Make up what you need to.
That's correct. Well done!
Example:
div#banner {
Press Tab or click button to advance to next exercise.
12. Code the 3 lines of styling that eliminate whitespace on the top and sides. Deal with the top in the second line.
That's correct. Well done!
The correct code:
position: absolute;
top: 0;
left: 0;
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 eliminates whitespace on the left and right.
Press Tab or click button to check answer.
The correct code:
left: 0;
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
14. Time goal: 25 seconds. Code the line that creates a color block. Use any color name a child would recognize.
Press Tab or click button to check answer.
Example:
background-color: blue;
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 line that eliminates the gap above the div.
Press Tab or click button to check answer.
The correct code:
top: 0;
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
16. Time goal: 20 seconds. Code the line that forces the browser to place the div exactly where you want it.
Press Tab or click button to check answer.
The correct code:
position: absolute;
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
17. Time goal: 15 seconds. Code the first line for styling a header section. Make up what you need to.
Press Tab or click button to check answer.
Example:
div#banner {
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 3 lines of styling that eliminate whitespace on the top and sides. Deal with the top in the second line.
Press Tab or click button to check answer.
The correct code:
position: absolute;
top: 0;
left: 0;
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