CSS MCQ
CSS MCQ
1. font-size
2. text-size
3. text-style
4. None
1. style
2. <style>
3. <link>
4. <script>
3. Which of the following CSS property is used to set the background image of an element?
1. background-color
2. background-image
3. background-attachment
4. None
4. Which of the following is the correct syntax to display the hyperlinks without any
underline?
1. a {decoration : no-underline;}
2. a {text-decoration : underline;}
3. a {text-decoration : none;}
4. None
5. Which of the following is the correct syntax to make the background-color of all
paragraph elements to yellow?
1. padding-right
2. padding-left
3. padding
4. All of the above
1. example
2. #example
3. Class example
4. .example
1. weight: bold
2. font-weight : bold
3. style: bold
4. font: bold
1. background-color
2. color
3. bgcolor
4. None
10. Which of the following syntax is correct in CSS to make each word of a sentence start
with a capital letter?
1. transform : capitalize;
2. text-style : capital;
3. text-transform : capital;
4. text-transform : capitalize;
11. CSS stands for _________
12. Which of the following is the correct syntax for referring the external style sheet?
13. The CSS property used to specify whether the text is written in the horizontal or vertical
direction?
1. text-indent
2. writing-mode
3. word-break
4. None
14. Which of the following is the correct syntax to select all paragraph elements in a div
element?
1. p
2. div p
3. div#p
4. div ~p
15. Which of the following CSS property is used to add shadows to the text?
1. text-stroke
2. text-decoration
3. text-shadow
4. text-overflow
16. Which of the following CSS property is used to specify whether the table cells share the
common or separate border?
1. border-radius
2. border-collapse
3. border-spacing
4. None
17. The HTML attribute used to define the inline styles is___________
1. class
2. styles
3. style
4. None of the above
18. The CSS property used to draw a line around the elements outside the border?
1. line
2. border
3. padding
4. outline
19. Which of the following is the correct syntax to select the p siblings of a div element?
1. p
2. div p
3. div + p
4. div ~ p
20. Which of the following is used to specify the subscript of text using CSS?
1. vertical-align: super
2. vertical-align: sub
3. vertical-align: subscript
4. None
21. Which of the following CSS property is used to specify the space between every letter
inside an element?
1. character-spacing
2. alpha-spacing
3. letter-spacing
4. alphabet-spacing Answer: letter-spacing
22. Which of the following is not a value of the font-variant property in CSS?
1. small-caps
2. large-caps
3. normal
4. inherit
23. The CSS property used to make the rounded borders, or rounded corners around an
element is________
1. border-radius
2. border-collapse
3. border-spacing
4. None
24. The CSS property used to specify the transparency of an element is____________
1. visibility
2. filter
3. opacity
4. overlay
25. Which of the following CSS property defines how an image or video fits into container
with established height and width?
1. object-positionue
2. object-fit
3. position
4. None
26. Which of the following property is used as the shorthand property of margin
properties?
1. margin-right
2. margin-left
3. margin
4. None of the above
27. The CSS property used to set the distance between the borders of the adjacent cells in
the table is__________
1. border-collapse
2. border-spacing
3. border-radius
4. None
28. Which of the following is not a type of combinator?
1. ~
2. >
3. +
4. *
29. Which of the following selector in CSS is used to select the elements that do not match
the selectors?
1. :not selector
2. :empty selector
3. :! selector
4. None
1. No
2. Yes
3. Can't say
4. May be
1. Tag
2. attribute
3. property
4. None of the above
36. If we want define style for an unique element, then which css selector will we use ?
1. Tag
2. class
3. element
4. id
37. Which attribute can be added to many HTML / XHTML elements to identify them as a
member of a specific group ?
1. Tag
2. class
3. element
4. id
1. .
2. #
3. element
4. none of the above
1. .
2. #
3. element
4. none of the above
1. #footer { color:#FF00FF; }
2. .footer { color:#FF00FF; }
3. footer { color:#FF00FF; }
4. None of the above
41. Which of the following CSS Property controls how an element is positioned?
1. Position
2. background
3. border
4. float
42. Which of the following CSS Property specifies the top offset of a positioned element?
1. bottom
2. left
3. top
4. right
43. Which of the following property sets the background image to scroll or not to scroll
with its associated element’s content?
1. background-scroll
2. background-transition
3. background-image
4. none of the above
44. Which of the following property defines the color of an element’s right border?
1. border-left
2. border-bottom
3. border-right
4. border
45. Which of the following property defines the space between cells in a table?
1. border-align
2. spacing
3. border
4. border-spacing
46. Which of the following property sets the size of the font?
1. font
2. font-size
3. font-color
4. none of the above
1. single page
2. multiple pages
3. both a and b
4. none of the above
1. 4
2. 6
3. 3
4. 5
1. <script>
2. <style>
3. <head>
4. none of the above