True/False
Indicate whether the sentence or statement is true
or false.
|
|
1.
|
The
only draw back to working with CSS is the lack of support in older browsers.
|
|
2.
|
The
main components of CSS syntax are <layer> tags and their
associated style rules.
|
|
3.
|
The
style rule expresses the style information for an element in the HTML document.
|
|
4.
|
The
selector specifies the exact property values to be applied to the element.
|
|
5.
|
The
declaration determines the element to which the rule is applied.
|
|
6.
|
The
property in CSS is a quality or characteristic, such as color, font size, or margin, followed by a
semicolon (;).
|
|
7.
|
An
internal style sheet is a stand-alone document that is shared by a number of Web pages.
|
|
8.
|
Style
rules contained in the <style> element only affect the document in which they
reside.
|
|
9.
|
After
you create the external style sheet, you need to link it to the HTML document you want the style
sheet to affect.
|
|
10.
|
CSS
doesn't allow comments within the <style> element or in an external style sheet.
|
|
11.
|
CSS
comments begin and end with a single quote.
|
|
12.
|
The
power of CSS comes from the different methods of selecting elements, which allow an HTML author to
apply style rules in a variety of ways.
|
|
13.
|
To
make your style rules more concise, you can group type selectors for which the same rules
apply.
|
|
14.
|
The
following style rules set the same declaration for two different elements; they set the color of
<h1> and <h2> elements to
red.
h1 {color: red
;}
h2 {color: red ;}
|
|
15.
|
The
flag character lets you write a style rule, assign it a name, and then apply that name to any
elements you choose.
|
|
16.
|
Cascading style sheets is a response to the need of a style and display language,
expressed separately from the structural HTML code, to let the authors control the way material was
displayed in a browser.
|
|
17.
|
CSS
syntax works by writing style rules that select an HTML element and then declare style
characteristics for the element.
|
|
18.
|
In
CSS, the property is the precise specification of a value, such as blue for color or 12 pt (point)
for font size.
|
|
19.
|
A
style rule you write is contained in a style sheet, and a style sheet is contained in a single Web
page to control the styles for that page only.
|
|
20.
|
You
generally use the style attribute to override a style that was specified at a higher level in the
document.
|
|
21.
|
An
external style sheet is simply a text document containing style rules.
|
|
22.
|
p
{color: blue;}
p {font-size: 12 pt;}
is the same as
p {color: blue; font-size: 12 pt;}
|
|
23.
|
The
following rule selects <b> elements within <li> elements within <ul> elements
only.
ul li b {color: blue;}
|
|
24.
|
You
can name a class selector anything you choose.
|
|
25.
|
CSS
is supported in Internet Explorer 4.0.
|
|
26.
|
The
first set of rules is identical to the last rule:
H1 {
font-weight: bold }
H2 { font-weight: bold
}
H3 { font-weight: bold }
H1; H2; H3 { font-style: bold
}
|
|
27.
|
The
following style rules are incorrect because the same declaration is repeated
twice.
h2 {color:
yellow;}
h3 {color: yellow;}
|
Multiple Choice
Identify the
letter of the choice that best completes the statement or answers the question.
|
|
28.
|
Which
of the following attributes is a powerful selection technique, because it allows you to write style
rules with names that are meaningful to your organization or information type? a. | layer | c. | class | b. | style | d. | font | | | | |
|
|
29.
|
CSS
comments begins with which of the following? a. | single quote | c. | /* | b. | double quote | d. | <! | | | | |
|
|
30.
|
Which
of the following style sheets is a stand-alone document that is shared by a number of Web
pages? a. | internal | c. | Internal
linked | b. | external | d. | Unlinked sheet | | | | |
|
|
31.
|
The
main components of CSS syntax are _____. a. | <layer> and their associated style
rules | b. | <style> and their associated style
rules | c. | <font> and their associated style
rules | d. | <font-family> and their associated style
rules | | |
|
|
32.
|
Style
rules contained in the which of the following element only affect the document in which they
reside? a. | <layers> | c. | <properties> | b. | <style> | d. | <attributes> | | | | |
|
|
33.
|
What
does this simple style rule do?
h1 {color: red;} a. | It sets all
headings to red. | c. | It sets all
links to red. | b. | It sets <h1> headings to
red. | d. | It sets all
colors of the page to red. | | | | |
|
|
34.
|
In
the following style rule, what does 'color' represent?
1 {color:
red;} a. | a
value | c. | a
property | b. | a rule | d. | a color link | | | | |
|
|
35.
|
Which
of the following attributes tells the browser that you are using the CSS style
language? a. | type="text/css" | c. | h1={color: red;} | b. | body={font-family: arial;} | d. | <type=CSS></type> | | | | |
|
|
36.
|
The
style attribute is always contained in which of the following sections of a
document? a. | body | c. | form | b. | title | d. | head | | | | |
|
|
37.
|
What
selector is the following rule using?
h1 {color: red;} a. | type
selector | c. | combining
declaration | b. | grouping selector | d. | descendant selector | | | | |
|
|
38.
|
Which
of the following selectors is this rule using?
h1 {color:
red;}
h2 {color: red;} a. | descendant selector | c. | grouping selector | b. | type
selector | d. | combining
declaration | | | | |
|
|
39.
|
Which
of the following expresses the following code more simply?
h1 {color:
red;}
h2 {color: red;} a. | {h1, h2 color: red} | c. | h1 and h2 {color: red;} | b. | h1, h2 {color:
red;} | d. | {h1 and h2 color:
red;} | | | | |
|
|
40.
|
Which
of the following is not one of the advanced selection techniques? a. | class
selector | c. | <span>
element | b. | <div>element | d. | <tag> element | | | | |
|
|
41.
|
Which
of the following attributes is used to add a style rule to a document after you create the style rule
that contains a class selector? a. | class | c. | flag | b. | quote | d. | margin | | | | |
|
|
42.
|
What
does the following example do?
div.introduction {font-size: 14 pt; margin:
24pt; text-indent: 28pt;} a. | It selects a division with a class named
introduction. | b. | It selects a division with a class named
text-indent. | c. | It selects a span with a class named
introduction. | d. | It selects a division with a class named
span. | | |
|
|
43.
|
In an
declaration, the property is followed by _____.
|
|
44.
|
Which
is a tag in the following code?
<style
type="text/css">
body { color: black;
background: white; }
</style> a. | type | c. | black | b. | color | d. | body | | | | |
|
|
45.
|
What
type of comments do style sheets use?
|
|
46.
|
Which
of the options is true about the following rule?
ul li b {color :
green;}
a. | It selects <ul> elements within <li> elements
within <b> elements. | b. | It selects <b> elements within <li> elements within
<ul> elements. | c. | It selects <li> elements within <b> elements within
<ul> elements. | d. | It selects <b> elements within <ul> elements within
<li> elements. | | |
|
|
47.
|
Class
names are preceded by a(n) _____. a. | period | c. | colon | b. | comma | d. | semicolon | | | | |
|
|
48.
|
Which
character is the flag character?
.special {font-size: 10pt; font-weight: bold;}
|
|
49.
|
Which
of the following contains leading and trailing line breaks? a. | <span> | c. | <class> | b. | <style> | d. | <div> | | | | |
|
|
50.
|
Who
first proposed CSS? a. | Bill Gates | c. | W3C | b. | Tim Berners-Lee | d. | None of the above | | | | |
|
|
51.
|
In
order to enjoy all of the benefits of CSS, Netscape users need to use version ____ or
above.
|
|
52.
|
In
order to enjoy all of the benefits of CSS, Internet Explorer users need to use version ____ or
above.
|
Completion
Complete each sentence or
statement.
|
|
53.
|
______________________ is an easy-to-use style language that lets you use familiar
desktop publishing terminology to control the appearance of Web pages.
|
|
54.
|
The
style rule expresses the style information for an element in the HTML document, and it is composed of
two parts: a(n) _______________________ and a declaration.
|
|
55.
|
A(n)
______________________ style sheet is a stand-alone document that is shared by a number of Web
pages.
|
|
56.
|
You
can define the style for a single element by using the ______________________
attribute.
|
|
57.
|
The
<style> element is always contained in the <______________________>
section of the document.
|
|
58.
|
The
______________________ flag character indicates that what follows is a class name.
|
|
59.
|
After
you create a style rule containing a class selector, you add it to the document by using the
____________________ attribute.
|
|
60.
|
The
______________________ attribute lets you select elements with greater precision than using basic
selectors.
|
|
61.
|
<div> and <span> element in HTML
are designed to be used with the ______________________ selector.
|
|
62.
|
You
can use <______________________> with the class attribute to
create customized block-level elements.
|
|
63.
|
The
<____________________> element lets you specify inline elements within a document
that have their own name and style properties.
|
|
64.
|
______________________ elements reside within a line of text, like the <b> or <em>
element.
|
|
65.
|
_________________ are expressed separately from the structural HTML code, to let the
authors control the way material displays in a browser.
|
|
66.
|
________________________ works by writing style rules that select an HTML element and
then declare style characteristics for the element.
|
|
67.
|
To
make style rules in a style sheet apply to multiple HTML documents, you can create a(n)
________________________ style sheet.
|
|
68.
|
After
you create an external style sheet, you need to ________________________ it to the HTML
document.
|
|
69.
|
The
following rule specifies the style for the class named
________________________.
.special {font-size: 10 pt; font-weight:
bold;}
|
|
70.
|
You
can use <________________________> with a class to create customized inline
elements.
|
|
71.
|
The
selector in the following is ________________________.
h3 {color:
green;}
|
|
72.
|
When
linking to an external style sheet, the ________________________ attribute gives the Web address
(URL) for your style sheet.
|