CSS MCQ

{$totalQuestions} Questions

CSS Multiple Choice Questions

Soopro Pathshala provides CSS MCQ (Multiple Choice Questions).

Question 1. Who is the father of CSS?
a) Hakon Wium Lie
b) Brendan Each
c) James Gosling
d) none of the above
Question 2. What is CSS?
a) CSS is a style sheet language
b) CSS is desgined to separate the presentation and content, including layout, colors, and fonts
c) CSS is the language used to style the HTML documents
d) all of the mentioned
Question 3. CSS stands for
a) Cascade style sheets
b) Color and style sheets
c) Cascading style sheets
d) None of the above
Question 4. The property in CSS used to change the background color of an element is-
a) bgcolor
b) color
c) background-color
d) all of the above
Question 5. The HTML attribute used to define the inline styles is-
a) style
b) styles
c) class
d) none of the above
Question 6. Are the negative values allowed in padding property?
a) Yes
b) No
c) Can't say
d) May be
Question 7. Which of the following css selectors are used to specify a group of elements?
a) tag
b) id
c) class
d) both class and tag
Question 8. Which of the following has introduced text, list, box, margin, border, color and background properties??
a) HTML
b) PHP
c) CSS
d) Ajax
Question 9. Which of the following css property is used to make the text bold?
a) text-decoration:bold
b) font-weight:bold
c) font-style:bold
d) text-align:bold
Question 10. Which of the following css style property is used to specify an italic text?
a) @font-face
b) style
c) font
d) font-style
Question 11. How many ways can CSS be used in?
a) 1
b) 2
c) 3
d) 4
Question 12. Placing css inside any html element is called?
a) inline css
b) internal css
c) external css
d) none of above
Question 13. What type of CSS is generally recommended for designing large web pages?
a) inline css
b) internal css
c) external css
d) none of above
Question 14. Which HTML tag is used to declare internal CSS?
a) link
b) style
c) script
d) none of above
Question 15. How can we select an element with a specific Id in CSS?
a) #
b) .
c) @
d) &
Question 16. If we put margin: 25px 50px 75px 100px; it will be applied?
a) Top, Right, Bottom, Left
b) Top, Right, Bottom, Left
c) Right, Left, Bottom, Top
d) Bottom, Left, Right, Top
Question 17. The CSS property used to specify the transparency of an element is?
a) filter
b) visibility
c) opacity
d) none of above
Question 18. Which of the following are valid ways to represent a colour in CSS?
a) A valid color name
b) RGB values
c) HEX values
d) None of above
Question 19. Setting an inline-block in CSS requires which of the following properties?
a) display
b) color
c) block
d) none of above
Question 20. When CSS was announced?
a) 1991
b) 1993
c) 1990
d) 1994
Question 21. Which of the following CSS property use for background image ?
a) background: set(Image path)
b) background: url(image path)
c) background: img( image path)
d) background: src(image path)
Question 22. How are custom fonts defined using CSS?
a) @font-face rule
b) @font-style rule
c) src tags rule
d) None of Above
Question 23. Which of the following are parts of the CSS box model?
a) Margins
b) Padding
c) Border
d) all of above
Question 24. Which of the following properties is used to text centre on display?
a) text-align:center;
b) align-items:center;
c) text-position
d) font-text:center;
Question 25. Which of the following CSS properties specifies the stack order of elements?
a) Z - index
b) overlap
c) no such specific property is present
d) flex
Question 26. Which of the following are types of length units in CSS?
a) Absolute
b) Relative
c) Both a and b
d) fixed
Question 27. Which CSS property specifies the display background size cover?
a) background-image:cover
b) background-size:cover
c) bg-size:cover;
d) bg-image-size:cover
Question 28. Which CSS property is used to create an image reflection?
a) box-reflect
b) image-reflect
c) reflect-image
d) reflect-images
Question 29. How many layout modes were there before the Flexbox Layout Module was introduced in CSS?
a) 1
b) 2
c) 3
d) 4
Question 30. The property in CSS used to change the background color of an element is -
a) bgcolor
b) color
c) background-color
d) all of the above
Question 31. To prevent background repeat which css will be apply here.
a) background-repeat:no-repeat;
b) background-repeat:none;
c) background-repeat:stop;
d) both b and c
Question 32. The CSS property used to draw a line around the elements outside the border?
a) border
b) outline
c) padding
d) line
Question 33. Which of the following CSS property is used to add shadows to the text?
a) text-shadow
b) text-stroke
c) text-overflow
d) text-decoration
Question 34. Which of the following CSS property is used to specify whether the table cells share the common or separate border?
a) border-collapse
b) border-radius
c) border-spacing
d) none of the above
Question 35. The CSS property used to make the rounded borders, or rounded corners around an element is
a) border-collapse
b) border-radius
c) border-round
d) radius-border
Question 36. The CSS property used to set the distance between the borders of the adjacent cells in the table is -
a) border-collapse
b) border-radius
c) border-spacing
d) None of the above
Question 37. The CSS property used to set the maximum height of the element's content box
a) max-vh
b) height
c) hegiht-max
d) max-height
Question 38. The CSS property which is used to define the set the difference between two lines of your content is -
a) height-line
b) max-height-line
c) line-height
d) None of the above
Question 39. The CSS property used to specify the order of flex item in the grid container is -
a) order property
b) float property
c) overflow property
d) none of the above
Question 40. How can we change the text color of an element?
a) color
b) background-color
c) text-color
d) none of the above
Question 41. Which of the following CSS property sets the shadow for a box element?
a) set-shadow
b) box-shadow
c) shadow
d) canvas shadow
Question 42. Which of the following CSS property is used to set the color of the text?
a) text-decoration
b) pallet
c) colour
d) color
Question 43. Which of the following CSS Property controls how an element is positioned?
a) static
b) position
c) fix
d) set
Question 44. Which of the following is an appropriate value for the overflow element?
a) scroll
b) hidden
c) auto
d) all of the mentioned
Question 45. Which of the following CSS property is used to specify table borders in CSS?
a) table:border
b) table
c) border
d) none of the mentioned
Question 46. Which of the following property is used to align the text in a table?
a) text:align
b) align
c) text
d) none of the mentioned
Question 47. Which of the following CSS Property sets the stacking order of positioned elements?
a) y-index
b) z-index
c) x-index
d) all of the mentioned
Question 48. Which of the following property allows a marquee to be used in the case of a text-overflow?
a) overflow-marquee
b) overflow-style
c) overflow-text
d) none of the mentioned
Question 49. Which of the following CSS property defines the space between cells in a table?
a) border-spacing
b) border-style
c) border
d) none of the mentioned
Question 50. Which of the following CSS3 property can be used to allow line breaks within words?
a) line-break
b) line-wrap
c) word-wrap
d) word-break
Question 51. Which of the following element is used by the filter property to blur the images?
a) opaque()
b) scatter()
c) blur()
d) all of the mentioned
Question 52. Which of the following function adjust the brightness of an element’s color, for use by the filter property?
a) contrast()
b) dark()
c) light()
d) brightness
Question 53. Which of the following function with filter property to create your own sophisticated effects on DOM elements?
a) create()
b) DOM()
c) custom()
d) none of the mentioned
Question 54. Which of the following function converts an element’s color to a shade of gray, for use by the filter property?
a) shade()
b) grayscale()
c) black()
d) brightness
Question 55. Which of the following function flips an element’s colors, for use by the filter property?
a) image()
b) flip()
c) invert()
d) contrast()
Question 56. Which of the following function applies a saturation effect to an element’s color, making it appear more or less vivid, for use by the filter property?
a) color()
b) saturation()
c) saturate()
d) none of the mentioned
Question 57. Which of the following function defines a linear gradient as a CSS image?
a) grayscale()
b) gradient()
c) image()
d) linear-gradient()
Question 58. Which of the following function two dimensional transformation in matrix format?
a) matrix()
b) matrix2d()
c) matrix3d()
d) perspective
Question 59. Which of the following function apply a sepia tinge to an element’s color, typical of old photographs, for use by the filter property?
a) grayscale()
b) sepia()
c) contrast()
d) brightness()
Question 60. Which of the following CSS property is used to set the text formatting?
a) font
b) font-style
c) text-decoration
d) all the mentioned
Question 61. What does CSS stand for?
a) Creative style sheets
b) Cascading style sheets
c) Computer style sheets
d) Colorful style sheets
Question 62. Which HTML tag is used to link CSS?
a) <script>
b) <style>
c) <css>
d) <link>
Question 63. Which property changes text color?
a) bgcolor
b) font-color
c) color
d) text-color
Question 64. Which CSS property controls text size?
a) text-style
b) font-size
c) text-size
d) font-style
Question 65. How do you select an element with id "demo"?
a) .demo
b) #demo
c) .demo
d) demo
Question 66. How do you select elements with class "box"?
a) #box
b) *box
c) .box
d) box
Question 67. Which property changes background color?
a) bgcolor
b) background-color
c) color-background
d) bg-color
Question 68. Which property is used to make text bold?
a) font-weight
b) font-style
c) text-bold
d) text-weight
Question 69. Which CSS property adds space inside an element?
a) margin
b) padding
c) border
d) spacing
Question 70. Which property adds space outside an element?
a) margin
b) padding
c) border
d) outline
Question 71. Which symbol is used for comments in CSS?
a) //comment
b) <!---->
c) /*comment*/
d) ##comment
Question 72. Which property changes font type?
a) font-family
b) font-style
c) /*comment/*
d) ##comment
Question 73. Which value makes text italic?
a) bold
b) underline
c) italic
d) normal
Question 74. Which property aligns text horizontally?
a) text-position
b) align-text
c) text-align
d) horizontal-align
Question 75. Which property adds shadow to text?
a) box-shadow
b) shadow
c) text-shadow
d) font-shadow
Question 76. Which property controls element transparency?
a) opacity
b) transparent
c) visibility
d) filter
Question 77. Which CSS property creates rounded corners?
a) curve
b) border-style
c) border-radius
d) round-corner
Question 78. Which property changes the mouse cursor style?
a) mouse
b) cursor
c) pointer
d) icon
Question 79. Which property controls list bullet style?
a) list-style-type
b) bullet-style
c) list-type
d) style-list
Question 80. Which property changes line spacing?
a) text-spacing
b) line-height
c) line-spacing
d) spacing
Question 81. Which property changes the width of an element?
a) size
b) length
c) width
d) height
Question 82. Which property changes the height of an element?
a) height
b) width
c) size
d) length
Question 83. Which value hides an element?
a) display:none
b) visible:no
c) hide:true
d) opacity:1
Question 84. Which property is used for borders?
a) boundary
b) border
c) frame
d) outline
Question 85. Which CSS property changes the style of a border?
a) border-type
b) border-design
c) border-style
d) border-format
Question 86. Which property changes border color?
a) border-color
b) color-border
c) border-style
d) border-fill
Question 87. Which property changes border thickness?
a) border-size
b) border-width
c) border-thickness
d) border-style
Question 88. Which property positions an element?
a) float
b) align
c) position
d) display
Question 89. Which value places elements side by side?
a) block
b) inline
c) none
d) hidden
Question 90. Which property controls stacking order?
a) z-index
b) stack-order
c) order
d) layer
Question 91. Which property is used for animations?
a) animate
b) transition
c) motion
d) effect
Question 92. Which property rotates an element?
a) rotate
b) transform
c) transition
d) skew
Question 93. Which property adds shadow to boxes?
a) text-shadow
b) shadow-box
c) box-shadow
d) border-shadow
Question 94. Which value makes a flex container?
a) display:flex
b) position:flex
c) flex:display
d) layout:flex
Question 95. Which property changes image transparency?
a) opacity
b) image-opacity
c) transparent
d) filter
Question 96. Which property controls overflow content?
a) flow
b) overflow
c) extra-content
d) content-flow
Question 97. Which CSS unit is relative to font size?
a) px
b) cm
c) em
d) pt
Question 98. Which selector selects all elements?
a) *
b) #
c) .
d) all
Question 99. Which property sets the space between letters?
a) word-spacing
b) letter-spacing
c) text-spacing
d) font-spacing
Question 100. Which property changes the order of flex items?
a) flex-order
b) order
c) arrange
d) flex-position
Question 101. Which property controls table borders?
a) border-collapse
b) table-border
c) collapse-border
d) border-table
Question 102. Which property is used to float elements?
a) align
b) position
c) float
d) display
Question 103. Which property clears floated elements?
a) remove
b) clear
c) clean
d) stop-float
Question 104. Which value repeats a background image horizontally?
a) remove
b) clear
c) clean
d) stop-float
Question 105. Which property changes text decoration?
a) font-decoration
b) text-decoration
c) decoration
d) underline
Question 106. Which property changes capitalization?
a) text-transform
b) text-style
c) capitalize
d) underline
Question 107. Which property specifies the display behavior?
a) position
b) display
c) float
d) align
Question 108. Which property changes the background image?
a) background-image
b) image-background
c) bg-image
d) wallpaper
Question 109. Which property creates space between words?
a) word-spacing
b) letter-spacing
c) text-gap
d) spacing
Question 110. Which CSS property is used for responsive layouts?
a) grid-template-columns
b) responsive-layout
c) layout-style
d) auto-fit
Question 111. Which CSS property is used to underline text?
a) text-line
b) text-decoration
c) underline
d) font-decoration
Question 112. Which property changes the style of the mouse pointer?
a) icon
b) cursor
c) pointer-style
d) mouse-style
Question 113. Which value makes an element invisible but keeps its space?
a) display:none
b) visibility:hidden
c) opacity:0
d) hidden:true
Question 114. Which CSS property sets the maximum width?
a) width-max
b) max-width
c) maximum-width
d) max-size
Question 115. Which property sets the minimum height?
a) min-height
b) height-min
c) minimum-height
d) low-height
Question 116. Which CSS property controls the speed of transition effects?
a) transition-delay
b) transition-speed
c) transition-duration
d) animation-speed
Question 117. Which property specifies the font thickness?
a) font-size
b) font-weight
c) font-style
d) text-weight
Question 118. Which property controls whether text wraps or not?
a) white-space
b) text-wrap
c) wrap-text
d) overflow
Question 119. Which property is used to add space between table cells?
a) border-spacing
b) cell-spacing
c) table-spacing
d) spacing
Question 120. Which CSS property controls the order of layered elements?
a) layer-index
b) z-index
c) stack-order
d) order
Question 121. Which property sets the image size for backgrounds?
a) background-fit
b) background-size
c) image-size
d) bg-size
Question 122. Which property fixes the background image while scrolling?
a) background-scroll
b) background-fixed
c) background-attachment
d) image-attachment
Question 123. Which CSS property changes the transparency level?
a) visibility
b) opacity
c) transparent
d) alpha
Question 124. Which value centers a block element horizontally?
a) align:center
b) margin:auto
c) text-align:center
d) position:center
Question 125. Which property controls the spacing between words?
a) text-spacing
b) word-spacing
c) letter-spacing
d) line-height
Question 126. Which property changes the first letter style?
a) first-letter
b) ::first-letter
c) letter-style
d) text-first
Question 127. Which selector targets all elements inside ?
a) div+p
b) div p
c) div.p
d) div#p
Question 128. Which CSS property is used for grid layouts?
a) display: table
b) display: inline
c) display: grid
d) position: grid
Question 129. Which property aligns flex items vertically?
a) justify-content
b) align-items
c) flex-align
d) item-align
Question 130. Which property aligns flex items horizontally?
a) justify-content
b) align-items
c) align-items
d) float
Question 131. Which pseudo-class applies style when mouse hovers?
a) :click
b) :hover
c) :focus
d) :active
Question 132. Which pseudo-class applies style to visited links?
a) :link
b) :visited
c) :hover
d) :active
Question 133. Which property creates a gradient background?
a) background-style
b) background-color
c) background-image
d) color:gradient
Question 134. Which unit is relative to viewport width?
a) px
b) em
c) vw
d) cm
Question 135. Which CSS property controls the visibility of overflow text?
a) text-overflow
b) overflow-text
c) hidden-text
d) white-space
Question 136. Which property is used to create animations?
a) animate
b) keyframes
c) animation
d) transition
Question 137. Which at-rule is used for responsive design?
a) @media
b) @responsive
c) @screen
d) @mobile
Question 138. Which property controls the direction of flex items?
a) flex-wrap
b) flex-direction
c) flex-flow
d) direction
Question 139. Which value stacks flex items vertically?
a) row
b) column
c) inline
d) block
Question 140. Which property rounds image corners?
a) image-radius
b) border-radius
c) corner-radius
d) radius
Question 141. Which CSS property controls element resizing?
a) resize
b) size-control
c) scaling
d) element-size
Question 142. Which property hides overflowing content?
a) overflow:hidden
b) display:none
c) visibility:hidden
d) hide-content
Question 143. Which property changes the style of list bullets?
a) bullet-style
b) list-style-type
c) list-type
d) bullet-type
Question 144. Which property changes text direction?
a) direction
b) text-direction
c) writing-mode
d) orientation
Question 145. Which property is used to rotate elements?
a) rotate
b) animation
c) transform
d) skew
Question 146. Which property sets multiple background properties together?
a) background
b) background-group
c) bg-all
d) background-style
Question 147. Which selector selects direct child elements only?
a) >
b) +
c) ~
d) *
Question 148. Which CSS property controls column count in layouts?
a) column-count
b) columns
c) grid-columns
d) flex-columns
Question 149. Which value makes the cursor appear as a hand?
a) move
b) crosshair
c) pointer
d) wait
Question 150. Which property is used to blur an element?
a) blur
b) filter
c) opacity
d) transform
Question 151. Which CSS property changes the text color?
a) font-color
b) color
c) text-color
d) background-color
Question 152. Which property is used to set background color?
a) bgcolor
b) background-color
c) color-bg
d) bg-color
Question 153. Which property controls the font style?
a) font-style
b) text-style
c) font-weight
d) text-font
Question 154. Which property changes the size of text?
a) font-size
b) text-style
c) font-weight
d) size
Question 155. Which CSS property makes text uppercase?
a) text-style
b) text-transform
c) capitalize
d) font-case
Question 156. Which property is used to create space around elements?
a) padding
b) border
c) margin
d) spacing
Question 157. Which property creates space inside elements?
a) margin
b) padding
c) margin
d) spacing
Question 158. Which selector selects all paragraph tags?
a) .p
b) #p
c) p
d) *p
Question 159. Which selector selects an element with id "main"?
a) .main
b) #main
c) main
d) *main
Question 160. Which selector selects elements with class "box"?
a) .box
b) #box
c) box
d) *box
Question 161. Which property changes the border color?
a) border-style
b) border-width
c) border-color
d) color-border
Question 162. Which property changes border thickness?
a) border-thickness
b) border-width
c) border-color
d) color-border
Question 163. Which property changes the style of a border?
a) border-type
b) border-style
c) border-design
d) border-pattern
Question 164. Which property aligns text to center?
a) text-center
b) align
c) text-align
d) border-pattern
Question 165. Which property controls line spacing?
a) line-height
b) line-space
c) spacing
d) text-height
Question 166. Which property controls the transparency of an element?
a) transparency
b) opacity
c) visible
d) alpha
Question 167. Which property adds shadow to boxes?
a) box-shadow
b) text-shadow
c) shadow-box
d) border-shadow
Question 168. Which property adds shadow to text?
a) font-shadow
b) box-shadow
c) text-shadow
d) shadow
Question 169. Which property rounds the corners of an element?
a) border-round
b) border-radius
c) round-corner
d) curve
Question 170. Which property changes the mouse pointer?
a) mouse
b) pointer
c) cursor
d) hover
Question 171. Which property controls the display type of an element?
a) position
b) display
c) float
d) align
Question 172. Which value removes an element from display?
a) hidden
b) invisible
c) display:none
d) opacity:0
Question 173. Which property controls element positioning?
a) float
b) display
c) position
d) align
Question 174. Which position value places element relative to browser window?
a) absolute
b) fixed
c) relative
d) static
Question 175. Which property is used to float elements?
a) align
b) position
c) float
d) clear
Question 176. Which property clears floated elements?
a) clean
b) clear
c) remove
d) stop
Question 177. Which property changes the background image?
a) bg-image
b) background-image
c) image-bg
d) wallpaper
Question 178. Which property sets the size of background images?
a) background-size
b) image-size
c) bg-fit
d) fit-image
Question 179. Which property prevents background image repetition?
a) background-repeat: no-repeat
b) repeat: none
c) image-repeat: no
d) bg-repeat: stop
Question 180. Which property changes the font family?
a) font-family
b) font-type
c) text-family
d) font-style
Question 181. Which property makes text bold?
a) font-style
b) font-weight
c) text-bold
d) bold
Question 182. Which value makes text italic?
a) bold
b) underline
c) italic
d) normal
Question 183. Which property controls list bullet styles?
a) list-style-type
b) bullet-style
c) list-type
d) style-list
Question 184. Which property controls spacing between letters?
a) word-spacing
b) letter-spacing
c) text-spacing
d) spacing
Question 185. Which property controls spacing between words?
a) word-spacing
b) letter-spacing
c) text-gap
d) spacing
Question 186. Which CSS unit is relative to root font size?
a) px
b) rem
c) cm
d) pt
Question 187. Which CSS unit is relative to parent font size?
a) em
b) px
c) vh
d) cm
Question 188. Which unit is relative to viewport height?
a) vm
b) vh
c) em
d) rem
Question 189. Which property creates flexible layouts?
a) grid
b) flex
c) float
d) inline
Question 190. Which value creates a flex container?
a) display: flex
b) position: flex
c) flex: display
d) layout: flex
Question 191. Which property changes direction of flex items?
a) flex:direction
b) flex:wrap
c) flex-flow
d) flex-order
Question 192. Which property wraps flex items into multiple lines?
a) flex-wrap
b) wrap-flex
c) flex-lines
d) flex-group
Question 193. Which property aligns flex items horizontally?
a) align-items
b) justify-content
c) align-content
d) flex-align
Question 194. Which property aligns flex items vertically?
a) align-items
b) justify-content
c) align-flex
d) flex-center
Question 195. Which property creates grid layouts?
a) display:grid
b) grid-layout
c) layout-grid
d) grid-system
Question 196. Which property defines grid columns?
a) grid-template-columns
b) grid-columns
c) column-grid
d) template-columns
Question 197. Which pseudo-class styles hovered elements?
a) :active
b) :hover
c) :focus
d) :visited
Question 198. Which pseudo-class styles visited links?
a) :hover
b) :focus
c) :visited
d) :active
Question 199. Which pseudo-class styles focused input fields?
a) :hover
b) :focus
c) :visited
d) :active
Question 200. Which pseudo-element styles the first line?
a) ::first-letter
b) ::first-line
c) ::line
d) ::text-line
Question 201. Which property controls animation duration?
a) animation-time
b) animation-duration
c) transition-duration
d) motion-time
Question 202. Which rule defines animation frames?
a) @animation
b) @frames
c) @keyframes
d) @motion
Question 203. Which property rotates an element?
a) rotate
b) transform
c) transition
d) animation
Question 204. Which property creates smooth effects between states?
a) animation
b) transform
c) motion
d) transition
Question 205. Which property hides overflow content?
a) overflow:hidden
b) hidden:content
c) display:none
d) visibility:hidden
Question 206. Which property controls table border behavior?
a) border-collapse
b) table-border
c) border-table
d) collapse-table
Question 207. Which property changes the stacking order?
a) stack-order
b) order
c) z-index
d) layer
Question 208. Which symbol is used for CSS comments?
a) //
b) <!---->
c) ##
d) /**/
Question 209. Which at-rule is used for responsive design?
a) @screen
b) @responsive
c) @media
d) @mobile
Question 210. Which property changes text decoration like underline?
a) font-decoration
b) text-decoration
c) decoration
d) underline-style