Module quiz: Interactive CSS Quiz Answers
In this article i am gone to share Coursera Course: HTML and CSS in depth by Meta Week 2 | Module quiz: Interactive CSS Quiz Answers with you..
Enroll Link: HTML and CSS in depth
Visit This Link: Module quiz: HTML deep dive Quiz Answers
Module quiz: Interactive CSS Quiz Answers
Question 1)
Which of the following describes the CSS selector [href~=”dog”] ?
- Select all elements with the href attribute where the value ends with the word dog
- Select all elements with the href attribute where the value contains the word dog
- Select all elements with the href attribute where the value starts with the word dog
Question 2)
If you modify the second CSS selector mentioned to ‘div + p’ with the properties remaining the same, which of the <p> tags will have a change in color? Select all that apply.
HTML Code:
<div> <p>alpha</p> </div> <p>beta</p>
CSS code:
div p { color: red;}div p { color: blue;}
- Both alpha and beta
- Neither alpha nor beta
- Only alpha
- Only beta
Question 3)
Which of the following CSS selectors is suitable for selecting an element that is a child of another element? Select all that apply.
- Pseudo-class Selector
- Descendant Selector
- Child Selector
Question 4)
True or false. The following CSS code will change the color of paragraph elements to red.
/*p { color: red; }*/
- False
- True
Question 5)
An element with the property set as ‘position: fixed’ is placed relative to the parent (or ancestor) element, not the viewport.
- True
- False
Question 6)
Select the CSS units of measurement that are directly related to the viewport’s measurement. Choose all that apply.
- vi
- vb
- vh
- vw
Question 7)
Which of the following display CSS property values will result in a block-level element? Select all that apply.
- flex
- inline-grid
- none
- grid
Question 8)
Which of the following rules inside the @keyframes is valid code for moving an item by 100px from left to right, assuming elements have an absolute position. Select all that apply.
- None of the above
- from {right:100px;} to {right:0px;}
- from {top:0px;} to {top:100px;}
- from {left:0px;} to {left:100px;}
Question 9)
Which of the following are benefits of using preprocessors?
- Variable re-use
- If-Else Statements
- Loops
Question 10)
You’re developing a website and the customer has reported that the website doesn’t display correctly in their web browser. Which of the following will help you to investigate the issue? Select all that apply.
- Install and use a linter
- Review CSS selectors used and ensure that they are more specific
- Inspect the element using the browser developer tools
Question 11)
div + p is an example of which type of CSS selector?
- Child Selector
- Adjacent Sibling Selector
- General Sibling Selector
Question 12)
Which of the following CSS selectors is suitable for changing an element’s style based on the state of the element?
- Element Selector
- Class Selector
- Descendant Selector
- Pseudo-class Selector
Question 13)
Which of the following is the correct way of commenting in CSS?
- This is a comment.
- // This is a comment.
- /* This is a comment. */
- — This is a comment. —
Question 14)
An element with the property set as ‘position: absolute’ is placed relative to the parent (or ancestor) element, not the viewport.
- True
- False
Question 15)
Which of the following ARE a part of the grid shorthand property? Select all that apply.
- grid-area
- grid-template-areas
- grid-auto-flow
- align-self
Question 16)
If you modify the second CSS selector mentioned to ‘div + p’ with the properties remaining the same, which of the <p> tags will have a change in color? Select all that apply.
HTML Code:
<div> <p>alpha</p> </div> <p>beta</p>
CSS code:
div p { color: red; } div p { color: blue; }
- Both alpha and beta
- Neither alpha nor beta
- Only alpha
- Only beta
Question 17)
True or false. The following CSS code will change the color of paragraph elements to red.
/*p { color: red; }*/
- True
- False
Question 18)
You’re developing a website and another developer noticed that your CSS contains errors. Which of the following will help resolve CSS errors?
- Inspect the web page using the browser developer tools
- Install and use a linter
- Review CSS selectors used and ensure that they are more specific
Question 19)
You want to set the font-size of an element relative to the font-size of the root HTML element. Which of the following is the appropriate unit of measurement?
- em
- rem
- px
Question 20)
@mixin and @includes are NOT REQUIRED to be used inside which of the following?
- SASS
- SCSS
- Stylus CSS
Question 21)
Which of the following attribute selectors will make a selection based on starting of the value specified?
- [attribute=”value”]
- [attribute^=”value”]
- [attribute~=”value”]
- [attribute\*=”value”]