1. What are the first six characters of a tag that creates a single-line text field?
That's correct. Well done!
The correct code:
<input
Press Tab or click button to advance to next exercise.
2. Fill in the blank.
<input type=______ name="surname" size="25"
maxlength="40">
That's correct. Well done!
The correct code:
"text"
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.
<input type="text" _____="surname" size="25"
maxlength="40">
That's correct. Well done!
The correct code:
name
Press Tab or click button to advance to next exercise.
4. Fill in the blank.
<input type="text" name="surname" ____="25"
maxlength="40">
That's correct. Well done!
The correct code:
size
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 one-line text field.
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 first half of a tag that creates a one-line text field, ending with the name, which is "hobby".
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 second half of a tag that creates a one-line text field, beginning with the size, which is 8. Limit the number of characters to 20.
Press Tab or click button to advance to next exercise.
That's correct. Well done!
8. Code the first half of a tag that creates a one-line text field, ending with the name. Make up the name (keeping in mind that it can contain no spaces).
That's correct. Well done!
Example:
<input type="text" name="favorite_color"
Press Tab or click button to advance to next exercise.
9. Code the second half of a tag that creates a one-line text field, starting with the size. Make up the numbers.
That's correct. Well done!
Example:
size="50" maxlength="100">
Press Tab or click button to advance to next exercise.
10. Code a tag that creates a one-line text field. The name is "city". The numbers are 20 and 40.
That's correct. Well done!
The correct code:
<input type="text" name="city" size="20"
maxlength="40">
Press Tab or click button to advance to next exercise.
11. Code a tag that creates a one-line text field. Make everything up.
That's correct. Well done!
Example:
<input type="text" name="city"
size="20" maxlength="40">
Press Tab or click button to advance to next exercise.
12. Code a tag that creates a password field. Make everything up.
That's correct. Well done!
Example:
<input type="password" name="pwd"
size="12" maxlength="20">
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: 25 seconds. Code the second half of a tag that creates a one-line text field, beginning with the size, which is 8. Limit the number of characters to 20, after which scrolling occurs.
Press Tab or click button to check answer.
The correct code:
size="8" maxlength="20">
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
14. Time goal: 40 seconds. Code the first half of a tag that creates a one-line text field, ending with the name. Make up the name (keeping in mind that it can contain no spaces).
Press Tab or click button to check answer.
Example:
<input type="text" name="favorite_color"
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
15. Time goal: 30 seconds. Code the second half of a tag that creates a one-line text field, starting with the size. Make up the numbers.
Press Tab or click button to check answer.
Example:
size="50" maxlength="100">
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
16. Time goal: 60 seconds. Code a tag that creates a one-line text field. The name is "city". The numbers are 20 and 40.
Press Tab or click button to check answer.
The correct code:
<input type="text" name="city" size="20"
maxlength="40">
Press Tab or click button to advance to next exercise.
Press Tab or click button to advance to next exercise.
17. Time goal: 60 seconds. Code a tag that creates a one-line text field. Make everything up.
Press Tab or click button to check answer.
Example:
<input type="text" name="city"
size="20" maxlength="40">
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. Code a tag that creates a password field. Make everything up.
Press Tab or click button to check answer.
Example:
<input type="password" name="pwd"
size="12" maxlength="20">
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