WEB-DEVELOPMENT-APPLICATIONS practice question 16 of 25
A web designer evaluates the following CSS rule: .head { color: #0000ff; } Which element is selected as a result?
Full set: 131 questionsIn CSS, selectors are used to target HTML elements. A selector beginning with a period (.) is a class selector. The rule .head targets all HTML elements that have a class attribute with the value "head". Therefore,
A. would be selected by an element selector head, not a class selector .head.
B.
would be selected by an element selector h1, not a class selector .head.
C.
1. Mozilla Developer Network (MDN). (2023). Class selectors. In CSS: Cascading Style Sheets. Retrieved from https://developer.mozilla.org/en-US/docs/Web/CSS/Classselectors. (See the "Syntax" and "Examples" sections).
2. W3C. (2018, June 5). Selectors Level 3, Section 6.2: Class selectors. W3C Recommendation. Retrieved from https://www.w3.org/TR/selectors-3/#class-html.
3. Meyer, E. A., & Weyl, E. (2018). CSS: The Definitive Guide (4th ed.). O'Reilly Media. Chapter 2, "Selectors," section on "Class Selectors."
Keep practicing
Take the free WEB-DEVELOPMENT-APPLICATIONS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other WEB-DEVELOPMENT-APPLICATIONS practice questions
- Question 1Given the following JavaScript code: ```javascript var n1 = 10; var n2 = "20.39"; ``` Whi…
- Question 2Which attribute displays help text in an input field without specifying an actual value f…
- Question 4Which element attaches an external CSS document to a web page?
- Question 5Which HTML tag should a developer use to create a drop-down list?
- Question 6Which method allows the end user to enter text as an answer to a question as the page loa…
- Question 8Which layout design is easiest to manage on a variety of devices?
