1. Fill in the blank.
_______________ url("bckgrnd.png");
That's correct. Well done!
The correct code:
background-image:
Press Tab or click button to advance to next exercise.
2. Fill in the blank.
background-image: ___("bckgrnd.png");
That's correct. Well done!
The correct code:
url
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
3. Code the first line that fills the entire page with a background image.
That's correct. Well done!
The correct code:
body {
Press Tab or click button to advance to next exercise.
4. You can make the page load faster if you use an image slice that's _ _____ wide and tile it.
That's correct. Well done!
The correct answer:
1 pixel
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 a background image for 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.
Specify "gradient.png" as a background image.
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.
In three lines fill the entire page with the image "rose.jpg"
Press Tab or click button to advance to next exercise.
That's correct. Well done!
8. Style an ordered list with the ID "special" with a background image. Make up the image name.
That's correct. Well done!
Example:
ol#special {
background-image: url("pattern.png");
}
Press Tab or click button to advance to next exercise.
9. To tile across the screen horizontally, fill in the blank.
background-repeat: ________;
That's correct. Well done!
The correct code:
repeat-x
Press Tab or click button to advance to next exercise.
10. To tile down the screen vertically, fill in the blank.
background-repeat: ________;
That's correct. Well done!
The correct code:
repeat-y
Press Tab or click button to advance to next exercise.
11. Tile the image gradient.png horizontally across the entire page.
That's correct. Well done!
The correct code:
body {
background-image: url("gradient.png");
background-repeat: repeat-x;
}
Press Tab or click button to advance to next exercise.
12. Fill a div with the image square.gif, tiling it both horizontally and vertically. Make up the ID.
That's correct. Well done!
Example:
div#prices {
background-image: url("square.gif");
}
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: 45 seconds. In three lines fill the entire page with the image "rose.jpg"
Press Tab or click button to check answer.
The correct code:
body {
background-image: url("rose.jpg");
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
14. Time goal: 55 seconds. Style an ordered list with the ID "special" with a background image. Make up the image name.
Press Tab or click button to check answer.
Example:
ol#special {
background-image: url("pattern.png");
}
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. To tile across the screen horizontally, fill in the blank.
background-repeat: ________;
Press Tab or click button to check answer.
The correct code:
repeat-x
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
16. Time goal: 15 seconds. To tile down the screen vertically, fill in the blank.
background-repeat: ________;
Press Tab or click button to check answer.
The correct code:
repeat-y
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
17. Time goal: 80 seconds. Tile the image gradient.png horizontally across the entire page.
Press Tab or click button to check answer.
The correct code:
body {
background-image: url("gradient.png");
background-repeat: repeat-x;
}
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
18. Time goal: 55 seconds. Fill a div with the image square.gif, tiling it both horizontally and vertically. Make up the ID.
Press Tab or click button to check answer.
Example:
div#prices {
background-image: url("square.gif");
}
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