Unlock access to all the studying documents.
View Full Document
Unit C Getting Started with CSS
1. A style rule is composed of five main parts.
2. Each declaration ends with a period.
3. Web page rendering engines recognize declarations after a selector as starting after an opening curly brace.
4. Only one element in an HTML document can have a given id attribute value.
5. There is a limit of 100 element types that can be included in a single rule.
6. When writing CSS code, each declaration must start on its own line.
7. A selector identifies the HTML element to which a declaration applies.
True
8. CSS3 defines a set of elements that serve the same function as the div element but that include semantic value.
9. Style rules are lines or blocks of CSS code that specify the presentation of web page elements.
10. The style rule starts with one or more pairs, which identify the HTML element or elements to which the style rule
applies. _________________________
11. You insert CSS code in a style element with a(n) attribute specifying that the contents are written in
CSS._________________________
12. The default value of text-align is “center.”_________________________
13. The div attribute can be added to the opening tag for an element to give the element a unique
identity. _________________________
14. An inline style rule is a style rule inserted into the opening tag of an element using the style
attribute._________________________
15. A(n) id selector allows you to apply a style rule to an unlimited number of separate
1
56
Unit C Getting Started with CSS
elements. _________________________
16. Multiple selectors are separated by semicolons. _________________________
17. Using a process known as inheritance, declarations are applied to all descendant elements of selected elements.
________________________
18. Edits made to a declaration using browser tools do not change your saved stylesheet. _________________________
19. When working with a style rule, one or more _______ follow the selector(s); each specifies a CSS attribute to apply to
the selector(s) and the value to assign to the attribute.
20. Selectors can be based on ____.
21. When multiple style rules select the same element and specify different values, CSS rules calculate the selector’s ____,
which is its priority relative to other selectors.
22. The ____ attribute determines the horizontal alignment of text.
False – class
1
62
Unit C Getting Started with CSS
23. An id selector is simply a pound sign (#) followed by the id ____ for the element.
24. Sometimes you want to assign the same declaration to multiple selectors. To do this, type the selectors with a ____
after each one except the last.
25. To create the presentation of elements in a single web page, you can create a(n) _____ .
26. The ____ attribute creates blank space between the div element and elements nested inside it.
27. A CSS comment starts with _____ .
28. A class selector consists of a ____ followed by a class attribute value.
29. An id attribute value can be assigned to ______ element(s).
30. A single HTML element is limited to ____ attributes.
31. If multiple rules applied to the same element specify values for the same attribute, the value from the ____ rule in the
style sheet is applied.
32. An ____ style sheet, is a separate file containing style information that multiple web pages can link to.
33. In CSS code, any text between ____ is treated as a comment and ignored by user agents.
34. The ____ attribute specifies the filename of the external style sheet.
1
62
35. The values for the ____ and type attributes specify that user agents should read the external document as a style sheet
written in CSS.
36. Because the contents of an external style sheet are written entirely in CSS, the file uses the extension ____.
37. A(n) ____ style is a style rule inserted into the opening tag of an element using the style attribute.
38. Changing an inline style requires locating the style ____.
within an embedded style sheet
within an external style sheet
39. To apply the style rules in a stylesheet to every page on a web site, you add a(n) _____ element to each HTML
document.
40. The ____ selector specifies a series of nested elements and selects the final, most deeply nested element.
41. The same ____ attribute can be applied to one element or to multiple elements.
Unit C Getting Started with CSS
42. The figures above show _____ .
43. Some developers prefer to keep all declarations on the same line as the selector, as shown in the ____ in the figure
above.
44. Some developers prefer to give each declaration its own line, often indented beneath its selector, as shown in the ____
in the figure above.
1
57
Unit C Getting Started with CSS
45. In the figure above, item ____ shows style rule(s) applied to a class.
46. In the figure above, item ____ shows style rule(s) applied to the body element.
47. In the figure above, item ____ shows style rule(s) applied to multiple selectors.
48. In the figure above, item ____ shows style rule(s) applied to an id selector.
1
61
49. In the figure above, the paragraphs pointed to by the red arrows are formatted the same way because they _____ .
50. In the figure above, a(n) ____ was used to obtain the consistent look and feel between the web pages.
51. In the figure above, item _____ points to the style rules for the selected element.
Unit C Getting Started with CSS
52. In the figure above, item _____ points to a style rule that is not applied to the selected element.
Case-Based Critical Thinking Question
Tim just started working as an intern for a local television station. He is responsible for maintaining the station’s website,
and he is learning CSS as fast as he can.
53. Tim discovers, through trial and error, that he cannot assign the same id value to multiple elements. He quickly
changes his strategy and uses a(n) ______ attribute instead.
54. Tim wants his selector to show that an element is a direct child of another element so he uses _____ between the
elements in his selector.
55. When working on the horizontal alignment of text, Tim wants the article paragraph to use the same text-alignment as
the enclosing element so he uses the ______ text-align value.
Case-Based Critical Thinking Question
Beverly is creating a website to document her trip to Spain. Her friend, Gail, gives her a cheat sheet of useful CSS tips.
1
73
56. Gail’s tip sheet states reminds her to use a(n) ____ before each class selector.
57. The tip sheet also reminds her to start each id selector with a(n) ______ .
58. In the figure above, which lines of code set the style for the header?
59. In the figure above, which lines of code set the formatting for the footer?
60. You add CSS to an HTML document by inserting style ________________, which are lines or blocks of CSS code
that specify the presentation of Web page elements.
61. The most general selectors are the names of HTML elements, such as h1 or p, which are known as
________________ selectors.
62. A(n) ________________ style sheet is a section of CSS code entered in the head element of an HTML document.
63. HTML allows you to add the ________________ attribute to the opening tag for an element to give the element a
name.
64. A class ________________ creates a style rule based on values assigned to elements using the HTML class attribute.
65. Name and describe the two parts of a style rule.
66. In what situation(s) should you use an id selector? What is the syntax of an id selector.
67. What are developer tools? Why might you use them?
68. A separate file containing style information that multiple web pages can link to
69. Consists of CSS style rules entered in the head element of an HTML document
70. A style rule inserted into the opening tag of an element using the style attribute
71. When multiple style rules select the same element and specify different values for the same property, CSS uses
availability rules for determining which declaration applies to the element.
72. The _____ attribute limits a given value to a single instance in a web page.
Unit C Getting Started with CSS
Match each part of a link element used to link a stylesheet to an HTML document.
73. specifies the file name of the linked file
74. indicates the type of content in the linked file
75. file extension for a stylesheet
1