CSS Set 2 (20 mcqs)

1. A navigation bar needs standard HTML as a base
A.    True
B.    False

2. The ____________ selector is used to specify a style for a single, unique element
A.    Id
B.    class
C.    text
D.    Bit

3. Which of the following ways below is correct to write a CSS?
A.    p {color:red; text-align:center};
B.    p {color:red; text-align:center}
C.    p {color:red; text-align:center;}
D.    p (color:red;text-align:center;)

4. The ____________ property specifies which sides of an element other floating elements are not allowed.
A.    cleared
B.    clear
C.    float
D.    Both A and B  above

5. Which of the below is the correct way to set a background image?
A.    body {background-image:url(paper.gif);}
B.    body {background-image:url(‘paper.gif’)};
C.    body {background-image:url(‘paper.gif’)}
D.    body {background-image:url(‘paper.gif’);}

6. The ___________ property specifies the stack order of an element
A.    d-index
B.    s-index
C.    x-index
D.    z-index

7. Block elements can be aligned by setting the left and right margins to “align”
A.    True
B.    False

8. Which of the below is the correct way to set a font size?
A.    h2{font-size:200%;}
B.    h2{font-size:200px;}
C.    both a and b above
D.    h2{font-size:200;}

9. Elements in CSS cannot be positioned unless the positioning property is set first
A.    True
B.    False

10. What is CSS Float?
A.    allows other element to wrap around an element
B.    element can be pushed to the left to right
C.    both a and b above
D.    element can be pushed to any direction

11. To specify table border in CSS, ____________ property is  used
A.    tbl-border
B.    table-border
C.    tb-border
D.    border

12. _________ property can be used to Increase or decrease the space between words
A.    space
B.    word-spacing
C.    word-space
D.    Both b and c above

13. Multiple external style sheets cannot be referenced inside a single HTML document
A.    True
B.    False

14. element-width property can be used to set the width of an element
A.    True
B.    False

15. The _________ property is mostly used to remove underline from links
A.    text-trans
B.    text-transformation
C.    text-decoration
D.    text-deco

16. Which of the following statements is TRUE for CSS
A.    An external style sheet is ideal when the style is applied to many pages
B.    An inline style sheet should be used when a single document has a unique style
C.    Both A and B above
D.    An external style sheet can be written in HTML

17. Which of the following statements is/are true?
A.    Hiding an element can be done by setting the display property to “none”
B.    Hiding an element can be done by setting visibility property to “hidden”
C.    Both A and B above
D.    Hiding an element can be done by setting block property to “hidden”

18. The font-size value can be an absolute, or relative size
A.    True
B.    False

19. ______________ property specifies an image to use as the background of an element
A.    backg-img
B.    backg-image
C.    background-img
D.    background-image

20. ID name should not start with a number
A.    False
B.    True

Answers

1.A 2.A 3.C 4.B 5.D 6.D
7.B 8.C 9.A 10.C 11.C 12.B
13.B 14.B 15.C 16.A 17.C 18.A
19.D 20.B

Sharing is caring!

Leave a Comment

Your email address will not be published. Required fields are marked *

shares