//adsense code

Introduction to CSS3 Week 2 Answers

Introduction to CSS3 Week2

University of Michigan

Introduction to CSS3 Week 2 quiz answers University of Michigan

Advanced Selectors Quiz Quiz


1. 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"?

a. red
b. green
c. black
d. browser default
Ans: a

2. 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>

What color font is used to display "Hi"?

a. red
b. green
c. black
d. browser default
Ans: c

3. 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>

What color font is used to display "Hi"?

a, red
b, green
c, black
d, browser default
Ans: c

4. What is the correct HTML for referring to an external style sheet?

a. <link rel="stylesheet" url="mystyle.css">
b. <link rel="stylesheet" href="mystyle.css">
c. <style src="mystyle.css"></style>
d. <link rel="stylesheet" src="mystyle.css">
Ans: b

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

a. <link rel="stylesheet" href="css/mystyle.css">
b. <link rel="css/stylesheet" href="css/mystyle.css">
c. <style src="css/mystyle.css">
d. <link rel="css/stylesheet" href="mystyle.css">
Ans: a

6. The link to the external style sheet should be in the:

a. Displayable content - <body>
b. Meta-data - <head>
c. Document type
Ans: b

7. Which CSS property controls the text size?

a. text-style
b. text-size
c. font-height
d. font-size
Ans: d

8. How do you display hyperlinks without an underline?

a. a {underline:none;}
b. a { text-decoration:none; }
c. a {text-decoration:no-underline;}
d. a {decoration:no-underline;}
Ans: b

9. In the following code snippet, what value is given for the right margin?

margin: 5px 10px 3px 8px;

a. 5px
b. 10px
c. 3px
d. 8px
Ans: b

10. The # symbol specifies that the selector is a/an

a. class
b. tag
c. id
d. first
Ans: c

11. 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?

a. #button { height: 30px; width: 750px; color: black; }
b. #button { height: 30px; width: 750px; text: black; }
c. .button { height: 30px; width: 750px; text: black; }
d. .button { height: 30px; width: 750px; color: black; }
Ans: d

12. Which snippet of CSS is commonly used to center an element horizontally?

a. site-align: center;
b. margin: 0 auto;
c. margin: auto 0;
d. margin: center;
Ans: b

13. Using only a default style sheet..

a. will typically have no effect on the appearance of your page.
b. will typically make your page look worse.
c. will typically make your page look better
Ans: ...

14. Which of the following is not a browser prefix?

a. webkit
b. o
c. moz
d. edge
Ans: d

15. Descendant selectors
nav a{
....
}
are more general than child selectors
nav>a{
....
}

True

16. How much width will this div occupy?

div{
width:100px;
padding: 10px;
margin: 5px;
border: 2px;
}

Ans:  134px

17. The style tag and the style attribute are interchangeable -- this means that you accomplish the same effect with both.

False

18. In the following code snippet, what value is given for the left margin?

margin: 5px 10px 3px 8px;

a. 5px
b. 10px
c. 3px
d. 8px
Ans: d

19. A default style sheet is used to:

a. Eliminate differences in browser default styling.
b. Insert the prefixes needed to support different browsers.
Ans: a

Related Posts

Subscribe Our Newsletter

0 Comments to "Introduction to CSS3 Week 2 Answers"

Post a Comment

Share your view here!!