WGU C777 Web Development Applications PA Cascading Style Sheets (CSS3) Techniques Exam Questions and Answers
Which style rule correctly defines the 2em Arial font for all level two heading elements? A. h2 { font-family-: Arial; font-weight: 2em; } B. .h2 { font-name: Arial; font-size: 2em; } C. h2 { font-family: Arial; font-size: 2em; } D. .h2 { font-name: Arial; font-weight: 2em; } - C. h2 { font-family: Arial; font-size: 2em; } Explanation: The correct syntax for specifying the font family and size is font-family and font-size, not font-name or font-weight. Given the following CSS code: body { color: white; } Which part of an element is affected by the color property? A. Text B. Border C. Background D. Shadow - A. Text Explanation: The color property affects the text color of an element. What should be added first when embedding CSS in a single web page as an internal style sheet? A. A <style> element to the <head> section B. A <head> element to the <style> section C. Declarations within a <style></style> block D. Declarations within a <head></head> block - A. A <style> element to the <head> section Explanation: An internal style sheet should start with a <style> element within the <head> section. What is the first character a developer should use for an id selector in CSS? A. # B. : C. ; D. . - A. # Explanation: The # symbol is used to denote an id selector in CSS. A developer has an image that needs to remain in the same place when the page is scrolled. Which CSS positioning scheme should this developer use? A. Static B. Absolute C. Relative D. Fixed - D. Fixed Explanation: The fixed positioning scheme keeps an element in the same position even when the page is scrolled. A developer needs two pixels of space on the left side of content relative to the border. Which CSS property should this developer use? A. padding-left: 2px; B. border: 2px; C. margin-left: 2px; D. float: left; - A. padding-left: 2px; Explanation: The padding-left property adds space inside the element, between the content and its border. What immediately encloses the padding in the CSS box model? A. Content B. Margin C. Border D. Table - C. Border Explanation: In the CSS box model, the border immediately encloses the padding. What is the outermost box of the CSS box model? A. Border B. Padding C. Content D. Margin - D. Margin Explanation: The margin is the outermost part of the CSS box model. Which markup positions an image so that the lower part of it is even with the lower part of adjoining text? A. <img src="" vertical-align="baseline"> B. <img src="" text-align="bottom"> C. <img src="" padding="baseline"> D. <img src="" margin="bottom"> - A. <img src="" vertical-align="baseline"> Explanation: The vertical-align="baseline" attribute positions the lower part of the image with the lower part of adjoining text. Which syntax for a CSS class floats images to the right? A. .floatright { float: right; margin: 7px; } B. .floatright < float: right; margin: 7px; > C. .float { floatright: right; margin: 7px; } D. .float < float: right; margin: 7px; > - A. .floatright { float: right; margin: 7px; } Explanation: The syntax in option A is correct for floating an element to the right. A web designer reviews the following style rule: #brand { font-weight: bold; } Which paragraph element will it select? A. <p class="brand">Web Design</p> B. <p id="brand">Web Design</p> C. <p style="brand">Web Design</p> D. <p id="#brand">Web Design</p> - B. <p id="brand">Web Design</p>
Written for
- Institution
-
Western Governors University
- Course
-
WGU C777 (C777)
Document information
- Uploaded on
- January 15, 2025
- Number of pages
- 12
- Written in
- 2024/2025
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Also available in package deal