100% found this document useful (2 votes)
4K views

CSS Important MCQ Questions

The document contains 25 multiple choice questions about CSS. It tests knowledge on various CSS concepts like the definition of CSS, CSS selectors, CSS properties for fonts, text, background, and colors. The questions have a single correct answer out of 4 options for each. The document is a quiz to evaluate understanding of fundamental CSS concepts.

Uploaded by

bhuvangates
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
4K views

CSS Important MCQ Questions

The document contains 25 multiple choice questions about CSS. It tests knowledge on various CSS concepts like the definition of CSS, CSS selectors, CSS properties for fonts, text, background, and colors. The questions have a single correct answer out of 4 options for each. The document is a quiz to evaluate understanding of fundamental CSS concepts.

Uploaded by

bhuvangates
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

CSS IMPORTANT QUESTIONS

Q 1 - Which of the following is correct about CSS?

A - CSS is used to control the style of a web document in a simple and easy way.
B - CSS is the acronym for "Cascading Style Sheet".
C - You can write CSS once and then reuse same sheet in multiple HTML pages.
D - All of the above.

Q 2 - Which of the following is correct about CSS?

A - Style sheets allow content to be optimized for more than one type of device.
B - CSS can store web applications locally with the help of an offline catche.
C - Using CSS, we can view offline websites. The cache also ensures faster loading and better
overall performance of the website.
D - All of the above.

Q 3 - Which of the following is a component of CSS style rule?

A - Selector
B - Property
C - Value
D - All of the above.

Q 4 - Which of the following selector matches all elements of a type?

A - The Type Selector


B - The Universal Selector
C - The Descendant Selector
D - The Class Selector

Q 5 - Which of the following selector matches the name of any element type?

A - The Type Selector


B - The Universal Selector
C - The Descendant Selector
D - The Class Selector

Q 6 - Which of the following selector matches a particular element only when it lies inside a
particular element?

A - The Type Selector


B - The Universal Selector
C - The Descendant Selector
D - The Class Selector

Q 7 - Which of the following selector matches a element based on its class attribute?

A - The Type Selector


B - The Universal Selector
C - The Descendant Selector
D - The Class Selector

B.BHUVANESWARAN / AP (SS) / CSE / REC - 1


Q 8 - Which of the following selector matches a element based on its id?

A - The Id Selector
B - The Universal Selector
C - The Descendant Selector
D - The Class Selector

Q 9 - Which of the following selector selects all paragraph elements with a lang attribute?

A - p[lang]
B - p[lang="fr"]
C - p[lang~="fr"]
D - p[lang|="fr"]

Q 10 - Which of the following selector selects all paragraph elements whose lang attribute has a
value of exactly "fr"?

A - p[lang]
B - p[lang="fr"]
C - p[lang~="fr"]
D - p[lang|="fr"]

Q 11 - Which of the following selector selects all paragraph elements whose lang attribute contains
the word "fr"?

A - p[lang]
B - p[lang="fr"]
C - p[lang~="fr"]
D - p[lang|="fr"]

Q 12 - Which of the following selector selects all paragraph elements whose lang attribute contains
values that are exactly "fr", or begin with "fr-"?

A - p[lang]
B - p[lang="fr"]
C - p[lang~="fr"]
D - p[lang|="fr"]

Q 13 - Which of the following is a way to associate styles with your HTML document?

A - Embedded CSS - The <style> Element


B - Inline CSS - The style Attribute
C - Both of the above.
D - None of the above.

Q 14 - Which of the following is a way to associate styles with your HTML document?

A - External CSS - The Element


B - Imported CSS - @import Rule
C - Both of the above.
D - None of the above.

B.BHUVANESWARAN / AP (SS) / CSE / REC - 2


Q 15 - Which of the following is a true about CSS style overriding?

A - Any inline style sheet takes highest priority. So, it will override any rule defined in tags or rules
defined in any external style sheet file.
B - Any rule defined in tags will override rules defined in any external style sheet file.
C - Any rule defined in external style sheet file takes lowest priority, and rules defined in this file
will be applied only when above two rules are not applicable.
D - All of the above.

Q 16 - Which of the following defines a measurement as a percentage relative to another value,


typically an enclosing element?

A-%
B - cm
C - em
D - ex

Q 17 - Which of the following defines a measurement in centimeters?

A-%
B - cm
C - em
D - ex

Q 18 - Which of the following defines a relative measurement for the height of a font in em
spaces?

A-%
B - cm
C - em
D - ex

Q 19 - Which of the following defines a measurement relative to a font's x-height?

A-%
B - cm
C - em
D - ex

Q 20 - Which of the following defines a measurement in inches?

A - in
B - mm
C - pc
D - pt

Q 21 - Which of the following defines a measurement in millimeters?

A - in
B - mm
C - pc
D - pt

B.BHUVANESWARAN / AP (SS) / CSE / REC - 3


Q 22 - Which of the following defines a measurement in picas?

A - in
B - mm
C - pc
D - pt

Q 23 - Which of the following defines a measurement in points?

A - in
B - mm
C - pc
D - pt

Q 24 - Which of the following defines a measurement in screen pixels?

A - px
B - vh
C - vw
D - vmin

Q 25 - Which of the following defines 1% of viewport height?

A - px
B - vh
C - vw
D - vmin

B.BHUVANESWARAN / AP (SS) / CSE / REC - 4


Q 1 - Which of the following defines 1% of viewport width?

A - px
B - vh
C - vw
D - vmin

Q 2 - Which of the following uses 1vw or 1vh, whichever is smaller?

A - px
B - vh
C - vw
D - vmin

Q 3 - Which of the following is correct about Hex Code format of CSS colors?

A - The first two digitsRR represent a red value.


B - The next two are a green valueGG.
C - The last are the blue valueBB.
D - All of the above.

Q 4 - Which of the following is correct about Short Hex Code format of CSS colors?

A - This is a shorter form of the six-digit notation.


B - In this format, each digit is replicated to arrive at an equivalent six-digit value.
C - Each hexadecimal code will be preceded by a pound or hash sign '#'.
D - All of the above.

Q 5 - Which of the following is correct about RGB Values format of CSS colors?

A - This color value is specified using the rgb property.


B - This property takes three values, one each for red, green, and blue.
C - The value can be an integer between 0 and 255 or a percentage.
D - All of the above.

Q 6 - Which of the following is correct about Browser Safe Colors?

A - These are 216 colors which are supposed to be most safe and computer independent colors.
B - These colors vary from hexa code 000000 to FFFFFF.
C - These colors are safe to use because they ensure that all computers would display the colors
correctly when running a 256 color palette.
D - All of the above.

Q 7 - Which of the following property is used to set the background color of an element?

A - background-color
B - background-image
C - background-repeat
D - background-position

B.BHUVANESWARAN / AP (SS) / CSE / REC - 5


Q 8 - Which of the following property is used to set the background image of an element?

A - background-color
B - background-image
C - background-repeat
D - background-position

Q 9 - Which of the following property is used to control the repetition of an image in the
background?

A - background-color
B - background-image
C - background-repeat
D - background-position

Q 10 - Which of the following property is used to control the position of an image in the
background?

A - background-color
B - background-image
C - background-repeat
D - background-position

Q 11 - Which of the following property is used to control the scrolling of an image in the
background?

A - background-attachment
B - background
C - background-repeat
D - background-position

Q 12 - Which of the following property is used as a shorthand to specify a number of other


background properties?

A - background-attachment
B - background
C - background-repeat
D - background-position

Q 13 - Which of the following property is used to change the face of a font?

A - font-family
B - font-style
C - font-variant
D - font-weight

Q 14 - Which of the following property is used to make a font italic or oblique?

A - font-family
B - font-style
C - font-variant

B.BHUVANESWARAN / AP (SS) / CSE / REC - 6


D - font-weight

Q 15 - Which of the following property is used to create a small-caps effect?

A - font-family
B - font-style
C - font-variant
D - font-weight

Q 16 - Which of the following property is used to increase or decrease how bold or light a font
appears?

A - font-family
B - font-style
C - font-variant
D - font-weight

Q 17 - Which of the following property is used to increase or decrease the size of a font?

A - font-size
B - font
C - font-variant
D - font-weight

Q 18 - Which of the following property is used as shorthand to specify a number of other font
properties?

A - font-size
B - font
C - font-variant
D - font-weight

Q 19 - Which of the following property is used to set the color of a text?

A - color
B - direction
C - letter-spacing
D - word-spacing

Q 20 - Which of the following property is used to set the text direction?

A - color
B - direction
C - letter-spacing
D - word-spacing

Q 21 - Which of the following property is used to add or subtract space between the letters that
make up a word?

A - color
B - direction
C - letter-spacing

B.BHUVANESWARAN / AP (SS) / CSE / REC - 7


D - word-spacing

Q 22 - Which of the following property is used to add or subtract space between the words of a
sentence?

A - color
B - direction
C - letter-spacing
D - word-spacing

Q 23 - Which of the following property is used to add or subtract space between the words of a
sentence?

A - text-indent
B - text-align
C - text-decoration
D - text-transform

Q 24 - Which of the following property is used to align the text of a document?

A - text-indent
B - text-align
C - text-decoration
D - text-transform

Q 25 - Which of the following property is used to underline, overline, and strikethrough text?

A - text-indent
B - text-align
C - text-decoration
D - text-transform

B.BHUVANESWARAN / AP (SS) / CSE / REC - 8


Q 1 - Which of the following property is used to capitalize text or convert text to uppercase or
lowercase letters?

A - text-indent
B - text-align
C - text-decoration
D - text-transform

Q 2 - Which of the following property is used to control the flow and formatting of text?

A - white-space
B - text-shadow
C - text-decoration
D - text-transform

Q 3 - Which of the following property is used to set the text shadow around a text?

A - white-space
B - text-shadow
C - text-decoration
D - text-transform

Q 4 - Which of the following property is used to set the width of an image border?

A - border
B - height
C - width
D - -moz-opacity

Q 5 - Which of the following property is used to set the height of an image?

A - border
B - height
C - width
D - -moz-opacity

Q 6 - Which of the following property is used to set the width of an image?

A - border
B - height
C - width
D - -moz-opacity

Q 7 - Which of the following property is used to set the opacity of an image?

A - border
B - height
C - width
D - -moz-opacity

B.BHUVANESWARAN / AP (SS) / CSE / REC - 9


Q 8 - Which of the following property of a anchor element signifies unvisited hyperlinks?

A - :link
B - :visited
C - :hover
D - :active

Q 9 - Which of the following property of a anchor element signifies visited hyperlinks?

A - :link
B - :visited
C - :hover
D - :active

Q 10 - Which of the following property of a anchor element signifies an element that currently has
the user's mouse pointer hovering over it?

A - :link
B - :visited
C - :hover
D - :active

Q 11 - Which of the following property of a anchor element signifies an element on which the user
is currently clicking?

A - :link
B - :visited
C - :hover
D - :active

Q 12 - Which of the following property of a table element specifies whether the browser should
control the appearance of the adjacent borders that touch each other or whether each cell should
maintain its style?

A - :border-collapse
B - :border-spacing
C - :caption-side
D - :empty-cells

Q 13 - Which of the following property of a table element specifies the width that should appear
between table cells?

A - :border-collapse
B - :border-spacing
C - :caption-side
D - :empty-cells

Q 14 - Which of the following property of a table element controls the placement of the table
caption?

A - :border-collapse
B - :border-spacing

B.BHUVANESWARAN / AP (SS) / CSE / REC - 10


C - :caption-side
D - :empty-cells

Q 15 - Which of the following property of a table element specifies whether the border should be
shown if a cell is empty?

A - :border-collapse
B - :border-spacing
C - :caption-side
D - :empty-cells

Q 16 - Which of the following property of a table element allows browsers to speed up layout of a
table by using the first width properties it comes across for the rest of a column rather than having
to load the whole table before rendering it?

A - :table-layout
B - :border-spacing
C - :caption-side
D - :empty-cells

Q 17 - Which of the following property specifies the color of a border?

A - :border-color
B - :border-style
C - :border-width
D - :border-bottom-color

Q 18 - Which of the following property specifies whether a border should be solid, dashed line,
double line, or one of the other possible values?

A - :border-color
B - :border-style
C - :border-width
D - :border-bottom-color

Q 19 - Which of the following property specifies the width of a border?

A - :border-color
B - :border-style
C - :border-width
D - :border-bottom-color

Q 20 - Which of the following property changes the color of bottom border?

A - :border-color
B - :border-style
C - :border-width
D - :border-bottom-color

B.BHUVANESWARAN / AP (SS) / CSE / REC - 11


Q 21 - Which of the following property changes the color of top border?

A - :border-top-color
B - :border-left-color
C - :border-right-color
D - :border-bottom-color

Q 22 - Which of the following property changes the color of left border?

A - :border-top-color
B - :border-left-color
C - :border-right-color
D - :border-bottom-color

Q 23 - Which of the following property changes the color of right border?

A - :border-top-color
B - :border-left-color
C - :border-right-color
D - :border-bottom-color

Q 24 - Which of the following property changes the style of bottom border?

A - :border-bottom-style
B - :border-top-style
C - :border-left-style
D - :border-right-style

Q 25 - Which of the following property changes the style of top border?

A - :border-bottom-style
B - :border-top-style
C - :border-left-style
D - :border-right-style

B.BHUVANESWARAN / AP (SS) / CSE / REC - 12


Q 1 - Which of the following property changes the style of left border?

A - :border-bottom-style
B - :border-top-style
C - :border-left-style
D - :border-right-style

Q 2 - Which of the following property changes the style of right border?

A - :border-bottom-style
B - :border-top-style
C - :border-left-style
D - :border-right-style

Q 3 - Which of the following property changes the width of bottom border?

A - :border-bottom-width
B - :border-top-width
C - :border-left-width
D - :border-right-width

Q 4 - Which of the following property changes the width of top border?

A - :border-bottom-width
B - :border-top-width
C - :border-left-width
D - :border-right-width

Q 5 - Which of the following property changes the width of left border?

A - :border-bottom-width
B - :border-top-width
C - :border-left-width
D - :border-right-width

Q 6 - Which of the following property changes the width of right border?

A - :border-bottom-width
B - :border-top-width
C - :border-left-width
D - :border-right-width

Q 7 - Which of the following property specifies a shorthand property for setting the margin
properties in one declaration?

A - :margin
B - :margin-bottom
C - :margin-top
D - :margin-left

Q 8 - Which of the following property specifies the bottom margin of an element?

B.BHUVANESWARAN / AP (SS) / CSE / REC - 13


A - :margin
B - :margin-bottom
C - :margin-top
D - :margin-left

Q 9 - Which of the following property specifies the top margin of an element?

A - :margin
B - :margin-bottom
C - :margin-top
D - :margin-left

Q 10 - Which of the following property specifies the left margin of an element?

A - :margin
B - :margin-bottom
C - :margin-top
D - :margin-left

Q 11 - Which of the following property specifies the right margin of an element?

A - :margin-right
B - :margin-bottom
C - :margin-top
D - :margin-left

Q 12 - Which of the following property allows you to control the shape or appearance of the marker
of a list?

A - list-style-type
B - list-style-position
C - list-style-image
D - list-style

Q 13 - Which of the following property specifies whether a long point that wraps to a second line
should align with the first line or start underneath the start of the marker of a list?

A - list-style-type
B - list-style-position
C - list-style-image
D - list-style

Q 14 - Which of the following property specifies an image for the marker rather than a bullet point
or number?

A - list-style-type
B - list-style-position
C - list-style-image
D - list-style

Q 15 - Which of the following property serves as shorthand for the marker properties?

B.BHUVANESWARAN / AP (SS) / CSE / REC - 14


A - list-style-type
B - list-style-position
C - list-style-image
D - list-style

Q 16 - Which of the following property specifies the distance between a marker and the text in the
list?

A - marker-offset
B - list-style-position
C - list-style-image
D - list-style

Q 17 - Which of the following property specifies the bottom padding of an element?

A - padding-bottom
B - padding-top
C - padding-left
D - padding-right

Q 18 - Which of the following property specifies the top padding of an element?

A - padding-bottom
B - padding-top
C - padding-left
D - padding-right

Q 19 - Which of the following property specifies the left padding of an element?

A - padding-bottom
B - padding-top
C - padding-left
D - padding-right

Q 20 - Which of the following property specifies the right padding of an element?

A - padding-bottom
B - padding-top
C - padding-left
D - padding-right

Q 21 - Which of the following property serves as shorthand for the padding properties?

A - padding
B - padding-top
C - padding-left
D - padding-right

Q 22 - Which of the following value of cursor shows it as crosshair or plus sign?

A - crosshair
B - default

B.BHUVANESWARAN / AP (SS) / CSE / REC - 15


C - pointer
D - move

Q 23 - Which of the following value of cursor shows it as an arrow?

A - crosshair
B - default
C - pointer
D - move

Q 24 - Which of the following value of cursor shows it as a pointing hand?

A - crosshair
B - default
C - pointer
D - move

Q 25 - Which of the following value of cursor shows it as the 'I' bar?

A - crosshair
B - default
C - pointer
D - move

B.BHUVANESWARAN / AP (SS) / CSE / REC - 16

You might also like