Here are the correct answers:
1. In the following piece of CSS code, what is the rule? p { color: #676767 }
Answer: C- p
Explanation: In CSS, a rule consists of a selector (in this case, "p") and a declaration block (in curly braces), which contains one or more property-value pairs.
2. In the following piece of CSS code, what is body called? body { color: #ffffff }
Answer: C- selector
Explanation: In CSS, the "body" in this code is the selector, which is used to target the HTML element(s) that you want to apply styles to.
3. What is CSS used for?
Answer: D- to define the style and format of one or more web pages
Explanation: CSS (Cascading Style Sheets) is a language used to define the presentation or visual style of a web page. It allows you to control the layout, colors, fonts, and other visual aspects of your web pages.
4. In the following piece of CSS code, what is the property? p { color: #676767 }
Answer: B- color
Explanation: In CSS, a property is the specific visual characteristic that you want to modify, such as color, font-size, margin, etc.
5. Which of the following is true about CSS?
Answer: C- It is contained in a separate file than HTML files
Explanation: CSS can be written inline within HTML, but it is commonly contained in separate CSS files, which are linked to HTML files using the <link> tag. This allows for better organization and reusability of styles across multiple web pages.
6. Which part of the following CSS code would you edit to change the background color of the overall web page?
Answer: A- background-color: #C9E1FF
Explanation: In the CSS code provided, the "background-color" property sets the background color of the overall web page. Changing the value after the colon (#C9E1FF) to a different color code would result in a different background color.
7. In the following piece of CSS code, what is #ffffff called? body { color: #ffffff }
Answer: D- value
Explanation: In this context, #ffffff is the hexadecimal color value, which represents the color white. It is considered the value of the "color" property.
8. In the following piece of CSS code, what is the property selector? body { color: #ffffff background-color #525252 font-family: arial, "lucida console", sans-serif}
Answer: B- background-color
Explanation: In CSS, the property selector refers to the part of the code that specifies which CSS property you want to modify. In this case, "background-color" is the property selector.
9. Which part of the following CSS code would you edit to change the color of the heading text? body { color: #000000 background-color: #C9E1FF font-family: Arial, "Lucida Console", sans-serif} h1 {color: #114485 font-size: x-large font-family: Georgia, "Times New Roman", Times, serif;}
Answer: C- font-size: x-large
Explanation: In this CSS code, the "h1" selector targets heading elements, and the "color" property is used to specify the color of the heading text. To change the color, you would need to edit the value associated with the "color" property (#114485).
10. How many rules are contained in the CSS code? body { color: #000000 background-color: #C9E1FF font-family: Arial, "Lucida Console", sans-serif} h1 {color: #ffffff font-size: small font-family: Georgia, "Times New Roman", Times, serif;"
Answer: C- 3
Explanation: The CSS code contains 3 rules. The first rule targets the body element, the second rule targets the h1 element, and the third rule targets the font-family property in the h1 rule.