GkSeries.com

CSS Objective Type Questions(MCQs)& Answers

(21) Find the specificity of this “#x34y”.
[A] specificity = 0,0,0,1
[B] specificity = 0,0,1,0
[C] specificity = 0,1,0,0
[D] specificity = 1,0,0,0
Answer: specificity = 0,1,0,0
(22) Find the specificity of this ” style=”” “.
[A] specificity = 0,0,0,1
[B] specificity = 0,0,1,0
[C] specificity = 0,1,0,0
[D] specificity = 1,0,0,0
Answer: specificity = 1,0,0,0
(23) Which of the following elements are block and inline elements, respectively, that have no particular rendering?
[A] div
[B] span
[C] box-model
[D] both div and span
Answer: both div and span
(24) The _____________ property specifies the background color of an element.
[A] background-color
[B] border
[C] color
[D] display
Answer: background-color Error
(25) The ___________ property specifies if/how an element is displayed.
[A] background-color
[B] border
[C] color
[D] display
Answer: display
(26) The _____________ property allows us to include the padding and border in an element’s total width and height.
[A] margin
[B] box-sizing
[C] padding
[D] none of the mentioned
Answer: box-sizing
(27) ____________ property sets the coordinates of the clipping shape that exposes or hides the content of absolutely positioned elements
[A] clammper
[B] clip
[C] clear
[D] none of the mentioned
Answer: clip
(28) _____________ property defines the space between cells in a table.
[A] border
[B] border-spacing
[C] border-style
[D] none of the mentioned
Answer: border-spacing
(29) ____________ property defines whether table cell borders are connected or separate.
[A] border-color
[B] border
[C] border-style
[D] none of the mentioned
Answer: none of the mentioned
(30) ________________ property sets the background image to scroll or not to scroll with its associated element’s content
[A] background
[B] background-position
[C] background-attachment
[D] none of the mentioned
Answer: background-attachment
31 ____________ property associates a background image with an element.
[A] image
[B] background-image
[C] float
[D] none of the mentioned
Answer: background-image
32 ______________ property defines whether table cell borders are connected or separate.
[A] pre
[B] border-color
[C] border-collapse
[D] table
Answer: border-collapse
33 Which of the following CSS property sets the opacity level for an element?
[A] opacity
[B] transparency
[C] transparent
[D] all of the mentioned
Answer: opacity
34 . Which of the following property specifies the order of a flexible item relative to the rest of the flexible items inside the same container?
[A] sort
[B] layout
[C] order
[D] asort
Answer: order
35 Which of the following is an appropriate value for overflow element?
[A] hidden
[B] auto
[C] scroll
[D] all of the mentioned
Answer: all of the mentioned
36 Identify the CSS property that specifies the length of the space used for the tab character.
[A] size
[B] tab-size
[C] tab-space
[D] all of the mentioned
Answer: tab-size
37 Which of the following property specifies the stack order of an element?
[A] order
[B] z-index
[C] p-index
[D] auto
Answer: z-index
38 Which of the following property allows long words to be able to be broken and wrap onto the next line?
[A] line-wrap
[B] break-word
[C] word-wrap
[D] word-break
Answer: word-wrap
39 Which of the following CSS property can be used to provide the flex-direction and flex-wrap properties?
[A] flex
[B] flex-flow
[C] flex-wrap
[D] all of the mentioned
Answer: flex-flow
40 Which of the following specifies how much the item will grow relative to the rest of the flexible items inside the same container?
[A] flex-scale
[B] flex-size
[C] flex-grow
[D] flex-flow
Answer: flex-grow