Chapter 3

advertisement
Chapter 3
Cascading Style Sheets
True/False Questions
1. In the following style definition, the quotes around the color number are required: H2
{color:"#D61130"}
2. Note that technically you should not put a space between the point size "20" and the
letters "pt" in this style description: H2 {color:red; text-align:center; font-size:20pt}
3. If you use a style sheet to set <H2> header text at a size of 24 points, thinking that it will
make the <H2> text the same size as any <H1> text in your document, it may not
necessarily come out that way.
4. Using the font-weight property in a style description, the value for normal text is 100.
5. Font-variant is not one of HTML style's six text properties.
6. Setting font-weight to normal allows you to take away the default bold formatting of a
header.
7. Using just <P> tags in your document with no ending </P> tags, the paragraph style will
still give the desired effect.
8. Single-spacing, double-spacing, etc., can be specified using the line-height property.
9. You may get a "hanging" indent by using a negative number for the value of the textindent property.
10. How much space the browser should put between letters within words is known as
"kerning".
11. You can use styles to change the font type or "family" that is displayed, but you should
usually specify at least two font families.
3-1
12. If none of your specified font types is available on the user's system, then the browser
uses the default variable-width font that the user has specified in the browser's
preferences
13. In order to use the styles contained in this external style sheet (the .css document), we add
the <CSS> tag to the <HEAD> container of an HTML source document.
14. Styles cascade: any local styles override over any internal style definitions, which in turn
override any external style definitions.
15. The text file in which we save external style definitions may be given any legal filename,
but it must end in the three-letter extension .ess, for "external style sheet."
Multiple Choice Questions
16. Which of these is not a tag for formatting text on a web page?
A) <B>
B) <I>
C) <DD>
D) <SMALL>.
17. To create an internal style sheet, we use a special <STYLE> container that is placed in
the which section of the HTML source document?
A) <HEAD>
B) <BODY>
C) <INTERN>
D) <TITLE>
18. We separate the two style definitions within a style by using which of these?
A) ;
B) :
C) #
D) =
19. Which of these is NOT one of the four possible values for the text-align property?
A) left
B) right
C) fill
D) justify
3-2
20. Which of these is the default value for the text-align property?
A) left
B) right
C) fill
D) justify
21. Which of these is a font-style value similar to italics?
A) wavy
B) oblique
C) normal
D) Sicilic
22. Which of these represents the font-weight value for standard bold font?
A) 100
B) 300
C) 500
D) 700
23. Which of these represents the font-weight value for normal text?
A) 100
B) 300
C) 400
D) 800
24. Which of these style properties would you use to achieve the same effect as the
<BLINK> tag?
A) text-decoration
B) text-transform
C) font-variant
D) text-blink
25. Which of these is not one of HTML style's six text properties?
A) text-decoration
B) text-transform
C) font-variant
D) foreground
3-3
26. Which of these style properties affects the case (upper, lower) of text?
A) text-decoration
B) text-transform
C) font-variant
D) font-style
27. Which of these style properties would you use to underline text?
A) text-decoration
B) text-transform
C) font-variant
D) text-blink
28. Which of these is not a value that can be used with the text-decoration property?
A) underline
B) overline
C) upper-case
D) none
29. Which of the following properties controls how much space the browser should put
between letters within words?
A) word-spacing
B) letter-spacing
C) word-kerning
D) letter-kerning
30. Which of these properties can be specified using the single font property?
A) font-style
B) font-weight
C) font-size
D) all of the above
31. Which of these correctly specifies a sub-style named P.intro for the <P> tag?
A) <P STYLE=”intro”>
B) <P SUB-STYLE=”intro”>
C) <P CLASS=”intro”>
D) <P.intro>
3-4
32. <P STYLE="text-transform:uppercase; color:red"> is an example of:
A) internal style
B) external style
C) local style
D) none of the above
33. Which of these tags could you use to achieve the same effect as SPAN.largered
{color:red; font-size:20pt}?
A) <STYLE>
B) <FONT>
C) <FONT-COLOR>
D) <TEXT>
34. Which of these is a block-level container?
A) <SPAN>
B) <DIV>
C) <B>
D) b and c
35. In order to use the styles contained in this external style sheet (the .css document), we add
which of the following tag to the <HEAD> container of an HTML source document?
A) <LINK>
B) <CSS>
C) <ESS>
D) <EXT>
36. Which of the following represent numbers in the hexadecimal system?
A) F
B) A
C) P
D) a and b
37. The six hexadecimal digits in the color code are actually divided into three pairs of two
digits each. The first pair represents:
A) red
B) blue
C) green
D) binary
3-5
38. The six hexadecimal digits in the color code are actually divided into three pairs of two
digits each. The second pair represents:
A) red
B) blue
C) green
D) binary
39. The six hexadecimal digits in the color code are actually divided into three pairs of two
digits each. The third pair represents:
A) red
B) blue
C) green
D) binary
3-6
Download