Google News
logo
CSS - Quiz(MCQ)
1 .
Which property is used to change the background color?
A)
bgcolor
B)
background-color
C)
color
D)
bg-color

Correct Answer : Option (B) :   background-color

2 .
What property is used to change the text color of an element?
A)
color:
B)
fontcolor:
C)
text-color:
D)
font-color:

Correct Answer : Option (A) :  

color:

3 .
How do you add a background color for all <h1> elements?
A)
all.h1 {background-color:#0099DA;}
B)
h1.all {background-color:#0099DA;}
C)
h1 {background-color:#0099DA;}
D)
h1 {bg-color:#0099DA;}

Correct Answer : Option (C) :  

h1 {background-color:#0099DA;}

4 .
Which CSS property controls the text size?
A)
font-size
B)
text-style
C)
text-size
D)
font-style

Correct Answer : Option (A) :  

font-size

5 .
What is the correct CSS syntax for making all the <p> elements bold?
A)
p {font-weight:bold;}
B)
<p style="text-size:bold;">
C)
<p style="font-size:bold;">
D)
p {text-size:bold;}

Correct Answer : Option (A) :  

p {font-weight:bold;}

6 .
How do you display hyperlinks without an underline?
A)
a {underline:none;}
B)
a {text-decoration:no-underline;}
C)
a {decoration:no-underline;}
D)
a {text-decoration:none;}

Correct Answer : Option (D) :  

a {text-decoration:none;}

7 .
Some HTML elements have multiple states, like the link, how do you give it a particular style when the user hovers over the element?
A)
:onHover
B)
:mouseOver
C)
:hover
D)
:over

Correct Answer : Option (C) :   :hover

8 .
Which property is used to change the font of an element?
A)
font-style
B)
font-family
C)
font-weight
D)
font-height

Correct Answer : Option (B) :  

font-family

9 .
Which of the following property changes the width of bottom border?
A)
:border-bottom-width
B)
:border-top-width
C)
:border-left-width
D)
:border-right-width

Correct Answer : Option (A) :  

:border-bottom-width

10 .
How do you make a list that lists its items with squares?
A)
list: square;
B)
list-style-type: square;
C)
list-type: square;
D)
type:square;

Correct Answer : Option (B) :  

list-style-type: square;