Introduction to CSS3 Coursera week 2 Quiz Answer

Introduction to CSS3 Coursera week 2 Quiz Answer

Introduction to CSS3 Coursera
week 2 Quiz Answer


Advanced Selectors Quiz


Q1) Assume that this code is linked together correctly.

p{

  color: red;

  padding:10px 5px;

  background: black;

}

.fancy{

  font-family: cursive;

  background: red;

  color: green;

}

.plain{

  font-family: Times, serif;

  color: black;

}  


   <p>Hi</p>


What color font is used to display “Hi ”?

  • green
  • black
  • red
  • browser default



Q2) Assume that this code is linked together correctly.

p{

  color: red;

  padding:10px 5px;

  background: black;

}

.fancy{

  font-family: cursive;

  background: red;

  color: green;

}

.plain{

  font-family: Times, serif;

  color: black;

}  

 <p class = "plain fancy">Hi</p>Copy


What color font is used to display “Hi” ?

  • red
  • green
  • browser default
  • black



Q3) Assume that this code is linked together correctly.

p{

  color: red;

  padding:10px 5px;

  background: black;

}

.fancy{

  font-family: cursive;

  background: red;

  color: green;

}

.plain{

  font-family: Times, serif;

  color: black;

} 

<p class = "fancy plain">Hi</p>Copy


What color font is used to display “Hi” ?

  • red
  • green
  • black
  • browser default



Q4) What is the correct HTML for referring to an external style sheet?

  • <style src="mystyle.css"></style>
  • <link rel="stylesheet" url="mystyle.css">
  • <link rel="stylesheet" href="mystyle.css">
  • <link rel="stylesheet" src="mystyle.css">



Q5) What is the correct HTML for referring to an external style sheet stored in a subfolder called css?

  • <link rel="stylesheet" href="css/mystyle.css">
  • <link rel="css/stylesheet" href="mystyle.css"> 
  • <style src="css/mystyle.css">
  • <link rel="css/stylesheet" href="css/mystyle.css">



Q6) The styling contained in the style tag has precedence over the style attribute.

  • True
  • False



Q7) Which CSS property controls the text size?

  • font-size
  • text-size
  • text-style
  • font-height



Q8) How do you display hyperlinks without an underline ?

  • a {underline:none;}
  • a {decoration:no-underline;}
  • a { text-decoration:none; }
  • a {text-decoration:no-underline;}



Q9) In the following code snippet, what value is given for the right margin?

margin: 5px 10px 3px 8px;

  • 5px
  • 8px
  • 10px
  • 3px



Q10) The # symbol specifies that the selector is a/an

  • id
  • first
  • tag
  • class



Q11) Which of the following would be used to create class called button which has a width of 750px, a height of 30px and the color of the text is black?

  • #button { height: 30px; width: 750px; text: black; }
  • #button { height: 30px; width: 750px; color: black; }
  • .button { height: 30px; width: 750px; text: black; }
  • .button { height: 30px; width: 750px; color: black; }



Q12) Which snippet of CSS is commonly used to center an element horizontally?

  • margin: 0 auto;
  • margin: center;
  • site-align: center;
  • margin: auto 0;



Q13) Using only a default style sheet..

  • will typically make your page look better.
  • will typically make your page look worse.
  • will typically have no effect on the appearance of your page.



Q14) Which of the following is not a browser prefix?

  • webkit
  • edge
  • o
  • moz


Q15) Descendant selectors

nav a{

  ....

}


are more general than child selectors

nav>a{

  ....

}


  • True
  • False


Q16) How much width will this div occupy?

div{

   width:100px;

   padding: 10px;

   margin: 5px;

   border: 2px;

}


  • 134




----------------------------------------------------------------------------------------------------------------------------



Post a Comment

0 Comments