Deck 4: Cascading Style Sheets
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
Play
Full screen (f)
Deck 4: Cascading Style Sheets
1
The !important keyword allows you to specify that a rule should take precedence no matter what the order in the style sheet.
True
2
It is necessary to use the < style > element in an external style sheet.
False
3
Comments are embedded directly in the style sheet.
True
4
Style rules express the style characteristics for an HTML element.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
In a style rule, the ____ is a quality or characteristic, such as color, font size, or margin.
A) value
B) selector
C) declaration
D) property
A) value
B) selector
C) declaration
D) property
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
External style sheets have a(n) ____ extension.
A) .ess
B) .ss
C) .cs
D) .css
A) .ess
B) .ss
C) .cs
D) .css
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
How many parts compose a style rule?
A) two
B) three
C) four
D) five
A) two
B) three
C) four
D) five
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
The id selector lets you write rules, give each a name, and then apply that name to any elements you choose.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
CSS rules that are included earlier in a style sheet take precedence over later rules.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
A declaration is enclosed by which of the following character pairs?
A) ()
B) < >
C) []
D) {}
A) ()
B) < >
C) []
D) {}
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
The difference between an id attribute and a class attribute is that an id should refer to only one occurrence within a document.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
In a style rule, what determines the element to which a rule is applied?
A) style tag
B) selector
C) declaration
D) style sheet
A) style tag
B) selector
C) declaration
D) style sheet
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
An external style sheet affects a single page on a web site.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
By default, CSS property inheritance is disabled.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Which element in the document's < head > section points to an external style sheet named styles.css.
A) < styles >
B) < link >
C) < external >
D) < embed >
A) < styles >
B) < link >
C) < external >
D) < embed >
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
In a style rule, what details the exact property values?
A) selector
B) style sheet
C) style tag
D) declaration
A) selector
B) style sheet
C) style tag
D) declaration
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
Which of the following is a text document that contains the style rules?
A) An internal style sheet
B) The < style > element
C) The style attribute
D) An external style sheet
A) An internal style sheet
B) The < style > element
C) The style attribute
D) An external style sheet
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
Which attribute of the < link > element states the relative URL of the style sheet?
A) style
B) href
C) sheet
D) rel
A) style
B) href
C) sheet
D) rel
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
Which element is used to create an internal style sheet?
A) < link >
B) < internal >
C) < style >
D) < sheet >
A) < link >
B) < internal >
C) < style >
D) < sheet >
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
You can combine CSS rules with HTML code using an external style sheet.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
____________________ is the order of CSS rules dictating that child elements receive properties from parent elements.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
Which type of selector is based on the hierarchical structure of the elements in the document tree?
A) universal
B) combination
C) type
D) descendant
A) universal
B) combination
C) type
D) descendant
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
Which pseudo-class can be used to have underlines appear or change the color of text when the user points at an element?
A) :alter
B) :select
C) :hover
D) :transform
A) :alter
B) :select
C) :hover
D) :transform
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Which feature of CSS means that multiple style sheets and style rules can apply to the same document?
A) join
B) stack
C) cascade
D) coincide
A) join
B) stack
C) cascade
D) coincide
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Which UI element states selector matches any option button that is in a selected state?
A) enable
B) selected
C) disabled
D) checked
A) enable
B) selected
C) disabled
D) checked
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
Which type of selector lets you quickly select groups of elements and apply a style rule?
A) universal
B) combination
C) type
D) descendant
A) universal
B) combination
C) type
D) descendant
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
Which attribute has become the selector of choice when identifying layout sections of the page?
A) flag
B) id
C) div
D) class
A) flag
B) id
C) div
D) class
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
Which element can be used with the class and id attributes to create content containers on a web page?
A) < span >
B) < div >
C) < class >
D) < paragraph >
A) < span >
B) < div >
C) < class >
D) < paragraph >
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
To make your style rules more concise, you can group____________ to which the same rules apply.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
The __________ element lets you establish document relationships.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Style rules contained in ____ affect only the document in which they reside.
A) an internal style sheet
B) an inline style
C) the < body > tag
D) an external style sheet
A) an internal style sheet
B) an inline style
C) the < body > tag
D) an external style sheet
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
____ elements contain nested elements called ____ elements.
A) Child, parent
B) Parent, sibling
C) Sibling, child
D) Parent, child
A) Child, parent
B) Parent, sibling
C) Sibling, child
D) Parent, child
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
Because ______________ is the parent element of the content area of the HTML file, it is the selector to use whenever you want to apply a style across the entire document.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
CSS comments begin with ____.
A) /?
B) */
C) /*
D) ?/
A) /?
B) */
C) /*
D) ?/
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
The ____ element lets you specify inline elements within a document that have their own name and style properties.
A) < span >
B) < div >
C) < class >
D) < paragraph >
A) < span >
B) < div >
C) < class >
D) < paragraph >
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
The symbol for the universal selector is the ____.
A) asterisk ( * )
B) comma ( , )
C) period ( . )
D) apostrophe ( ' )
A) asterisk ( * )
B) comma ( , )
C) period ( . )
D) apostrophe ( ' )
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
The ____ selector lets you write rules, give them a name, and then apply that name to any elements you choose.
A) div
B) class
C) core
D) span
A) div
B) class
C) core
D) span
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Which term can be defined as CSS properties that are passed from one level of hierarchy to a lower level?
A) aggregation
B) inheritance
C) distribution
D) relational
A) aggregation
B) inheritance
C) distribution
D) relational
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
In a style rule, the ____________________ is the precise specification of the property.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
Which type of selector is the simplest?
A) grouping
B) combining
C) type
D) descendant
A) grouping
B) combining
C) type
D) descendant
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
What are the three ways that you can combine CSS style rules with HTML code? Describe each method, along with an example of using the method.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
The CSS cascading mechanism determines which rules are applied to document elements by assigning a(n) ____________________ to each rule.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
The ____________________ is useful for testing styles during development.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
What are the two components of a style rule? Describe them.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
The __________________ pseudo-element can only be applied to a block-level content and does not support padding, margin, or border properties.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
CSS applies weight to a rule based on its ____________________ within a style sheet.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
Explain pseudo-elements.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
The ____________________ element is a block-level element, and < span > is its inline equivalent.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
Explain inheritance as it applies to writing simpler style rules.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
Define "cascade" as it relates to CSS and explain the CSS cascading mechanism.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck