Explore topic-wise MCQs in Css.

This section includes 66 Mcqs, each offering curated multiple-choice questions to sharpen your Css knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following will select every

element that is the only child of its parent?

A. :optional
B. :out-of-range
C. :only-of-type
D. :only-child
E. None of these
Answer» E. None of these
2.

In what direction does float will work?
img {
float: left;
}

A. top
B. right
C. left
D. bottom
E. None of these
Answer» D. bottom
3.

Which of the following property defines the style, width, and color of the rule divider between
columns in a multicolumn text flow?

A. column-check
B. column-change
C. column-rule
D. column
E. None of these
Answer» D. column
4.

With, which tag you write the style rules directly within the document found
within the head of the document.

A. <style>
B. <script>
C. <css>
D. <php>
E. None of these
Answer» B. <script>
5.

Is this correct way to apply css.State true or false.
<link rel="stylesheet" type="text/css" href="mystyle.css">

A. False
B. True
C. NA
D. NA
E. NA
Answer» C. NA
6.

Which style is this?
<body style="background-color: lightcyan">

A. External Style Sheet
B. External Style Sheettyle Sheet
C. Inline Styles
D. All of above
E. None of these
Answer» D. All of above
7.

What will be the output of below mentioned code snippet?
<p style="color: blue">Interview Mania</p>

A. nothing happens
B. make that specific paragraph red.
C. error
D. All of above
E. None of tehse
Answer» C. error
8.

What will be the output of following code snippet?
<style h1 {color: blue;}> 
<h1>Hey</h1>

A. error
B. h1 heading disappears
C. nothing happens
D. h1 heading becomes blue
E. None of these
Answer» C. nothing happens
9.

What will be the output of below mentioned code snippet?
h1 {color: "blue";}

A. nothings happen
B. heading becomes blue
C. heading becomes dark-blue
D. error occors
E. None of these
Answer» B. heading becomes blue
10.

What will be the output of following code snippet?
h1 {color: red text-decoration: underline; font-style: italic;}

A. only font-style: italic works
B. _red, text-decoration_ underline works
C. _red, text-decoration_ underline and font-style_ italic all works
D. _underline and font-style_ italic works
E. None of these
Answer» B. _red, text-decoration_ underline works
11.

How many values are there for animation-full-mode property?

A. 4
B. 3
C. 2
D. 1
E. None of these
Answer» B. 3
12.

Which value specifies animation with slow start?

A. linear
B. ease-out
C. ease
D. ease-in
E. None of these
Answer» E. None of these
13.

Which of the following specifies animation code?

A. animation-delay
B. animation-direction
C. @keyframes
D. animation
E. None of these
Answer» D. animation
14.

In what direction does float will work?

A. top
B. right
C. left
D. bottom
E. None of these
Answer» D. bottom
15.

Which of the following property sets the distance between an element s right border and the rightmost edge of its content?

A. padding-right
B. auto
C. padding-top
D. padding-left
E. None of these
Answer» B. auto
16.

Which of the following property defines a mask to be used as a box s overlay in order to clip the box to a complex shape?

A. mask-image
B. mask-attachment
C. shadder
D. mask
E. None of these
Answer» E. None of these
17.

Which of the following CSS Property specifies whether the labels for an element s list items are positioned inside or outside the box defined by the listed item?

A. list-position
B. list-style-position
C. list-style
D. All of above
E. None of these
Answer» C. list-style
18.

Which of the following generate virtual rules representing their effects when running?

A. CSS Animations
B. DOM s
C. Inheritance
D. !important
E. None of these
Answer» B. DOM s
19.

Orphans and widows properties are supported by _________.

A. Opera 9.2+
B. Safari
C. Chrome
D. Firefox
E. None of these
Answer» B. Safari
20.

Which of the following selects every element whose href attribute value contains the given substring?

A. attribute^=value
B. attribute|=value
C. attribute$=value
D. attribute*=value
E. None of these
Answer» E. None of these
21.

outline-offset is not supported by _______________.

A. Opera
B. IE
C. Firefox
D. Chrome
E. None of these
Answer» C. Firefox
22.

A grid is not supported by _______________.

A. Opera
B. Firefox
C. Chrome
D. IE
E. None of these
Answer» E. None of these
23.

@font-feature-values are only supported in _______________.

A. IE
B. Opera
C. firefox
D. chrome
E. None of these
Answer» D. chrome
24.

Which of the following does not support the :hover pseudoclass?

A. Opera
B. Safari
C. IE 6
D. Chrome
E. None of these
Answer» D. Chrome
25.

Which of the following position is based on the user s scroll position?

A. static
B. relative
C. fixed
D. sticky
E. None of these
Answer» E. None of these
26.

Which of the following is not a combinatory?

A. ~
B. +
C. *
D. >
E. None of these
Answer» D. >
27.

@page is not supported by _________________.

A. IE
B. Firefox
C. opera
D. chrome
E. None of these
Answer» E. None of these
28.

Which selects document s root element?

A. :out-of-range
B. :required
C. :root
D. ::selection
E. None of these
Answer» D. ::selection
29.

Which of the following will select every

A. :optional
B. :out-of-range
C. :only-of-type
D. :only-child
E. None of these
Answer» E. None of these
30.

Which of the following property specifies an element s display type and can override an element s defined presentation?

A. display
B. visibility
C. content
D. All of above
E. None of these
Answer» F.
31.

Which of the following function converts an element s color to a shade of gray, for use by the filter property?

A. grayscale()
B. shade()
C. brightness()
D. black()
E. None of these
Answer» B. shade()
32.

Which of the following function adjust the brightness of an element s color, for use by the filter property?

A. light()
B. brightness()
C. contrast()
D. dark()
E. None of these
Answer» C. contrast()
33.

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. contrast()
B. brightness()
C. sepia()
D. grayscale()
E. None of these
Answer» D. grayscale()
34.

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. saturation()
B. saturate()
C. color()
D. All of above
E. None of these
Answer» B. saturate()
35.

___________ describes CSS properties to manipulate the position of ruby , which are small annotations on top of or next to words, especially common in Chinese and Japanese.

A. lang
B. text-align
C. align
D. ruby
E. None of these
Answer» E. None of these
36.

Find the specificity of this li:first-line .

A. specificity = 1,0,0,1
B. specificity = 0,0,1,1
C. specificity = 0,0,0,2
D. specificity = 0,1,0,1
E. None of these
Answer» D. specificity = 0,1,0,1
37.

For External Style Sheets in some cases when @import is used, the browser may cause a rendering flash under slow loading conditions.State true or false.

A. False
B. True
C. NA
D. NA
E. NA
Answer» C. NA
38.

For Inline Style don t need to reapply style information throughout the document and outside documents.State true or false.

A. False
B. True
C. NA
D. NA
E. NA
Answer» B. True
39.

With, which tag you write the style rules directly within the document found

A. <style>
B. <script>
C. <css>
D. <php>
E. None of these
Answer» B. <script>
40.

Which of the following tag can be used to embed a Document-wide styles in a document s head element?

A. <style>
B. <head>
C. <html>
D. <script>
E. None of these
Answer» B. <head>
41.

Which of the following property allows the author to explicitly set the amount of time it should take a speech synthesizer to read an element s content?

A. voice
B. voice-duration
C. @media
D. All of above
E. None of these
Answer» C. @media
42.

Which of the following property sets the speaker s voice used by a speech media agent to read an element?

A. voice-control
B. voice-family
C. voice-check
D. All of above
E. None of these
Answer» C. voice-check
43.

Which of the following property sets the width of an element s complete border?

A. border-depth
B. border-width
C. width
D. All of above
E. None of these
Answer» C. width
44.

Which of the following property defines the color of an element s top border?

A. border-top-color
B. border-top-color-webkit
C. border-top
D. border-color
E. None of these
Answer» B. border-top-color-webkit
45.

Which of the following property sets the width of an element s bottom border?

A. border-bottom-width
B. border
C. border-collapse
D. All of above
E. None of these
Answer» B. border
46.

Which of the following property defines the offset from an element s border and its outline?

A. outline-radius
B. outline-border
C. outline-offset
D. All of above
E. None of these
Answer» D. All of above
47.

Find the specificity of this li .

A. specificity = 0,1,1,1
B. specificity = 0,0,0,1
C. specificity = 1,1,1,1
D. specificity = 0,0,1,1
E. None of these
Answer» C. specificity = 1,1,1,1
48.

Find the specificity of this * .

A. specificity = 1,0,0,0
B. specificity = 0,0,1,0
C. specificity = 0,0,0,1
D. specificity = 0,0,0,0
E. None of these
Answer» E. None of these
49.

Find the specificity of this ul li .

A. specificity = 0,0,1,2
B. specificity = 2,0,0,0
C. specificity = 0,0,0,0
D. specificity = 0,0,0,2
E. None of these
Answer» E. None of these
50.

Which of the following is the Color Format that is a CSS s six-digit hexadecimal format as color defined in (X)HTML?

A. 3-Hex Color
B. 6-Hex Color
C. System Color Names
D. Specification defined named colors
E. None of these
Answer» B. 6-Hex Color