it is my midterm, please ensure the answers are correct before sending them to m
ID: 3762130 • Letter: I
Question
it is my midterm, please ensure the answers are correct before sending them to me.
Q3. In order to open a link in a new tab or browser window set the _____ equal to _____.
a. URL, new
b. Target, _blank
c. Href, _blank
d. Target, tab
Q5. A selector can indicate that a CSS rule applies to multiple elements. Which of the following shows how this is done?
a. h1 h2 h3 { }
b. h1, h2, h3 { }
c. h1; h2; h3 { }
d. {h1, h2, h3}
Q12. How will an older browser display a blue box which has been made semi-transparent using CSS 3 opacity?
a. Not display the block at all
b. Show a solid blue block rather than a semi-transparent one
c. Show the blue block and whatever is behind it
d. Show a solid black block
Q14. Which selector applies a rule to all elements?
a. @ { }
b. # { }
c. . { }
d. * { }
Q16. Which selector only applies to elements that follow an <h1> element?
a. h1>p { }
b. h1 p { }
c. h1+p { }
d. h1*p { }
Explanation / Answer
Answer 1: Option B - target, _blank
If you set the target attribute to "_blank", the link will open in a new browser window or a new tab.
E.g
<a href="http://www.google.com" target="_blank">Goto Google</a>
Answer 2: Option B - h1,h2,h3 {}
E.g
You can list as many selectors as you want with commas, as was said above:
Code:
Answer 3: Option C
Show the blue block and whatever is behind it
Answer 4: Option D
In many ways, the most powerful of the new CSS2 selectors is the universal selector. The universal selector can be used to represent any element at all, and is specified using an asterisk (*). Thus, use this declaration to make sure all elements are purple:
Answer 5: Option C
Adjacent sibling selectors have the following syntax: E1 + E2, where E2 is the subject of the selector. The selector matches if E1 and E2 share the same parent in the document tree and E1 immediately precedes E2, ignoring non-element nodes (such as text nodes and comments).
Thus, the following rule states that when a P element immediately follows a MATH element, it should not be indented:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.