CSS MCQ Test

CSS MCQ Test
Q1. A navigation bar needs standard HTML as a base
A. True
B. False

Right Answer: A

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

Right Answer: A

Q3. 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;)

Right Answer:C

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

Right Answer: B

Q5. 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’);}

Right Answer: D

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

Right Answer: D

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

Right Answer: B

Q8. 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;}

Right Answer: C

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

Right Answer: A

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

Right Answer: C

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

Right Answer: D

Q12. _________ 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

Right Answer: B

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

Right Answer: B

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

Right Answer: B

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

Right Answer: C

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

Right Answer: A

Q17. 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”

Right Answer: C

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

Right Answer: A

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

Right Answer: D

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

Right Answer: B

Advertisements

Please Login to Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s