Home Videos Exercises MCQ Q&A Quiz E-Store Services Blog Sign in Appointment Payment

CSS MCQ

Soopro Pathshala provides CSS MCQ(Multiple Choice Questions)


1. Who is the father of CSS?

a) Hakon Wium Lie

b) Brendan Each

c) James Gosling

d) none of the above

View Answer

Answer: (a) Hakon Wium Lie



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

View Answer

Answer: (d) all of the mentioned



3. CSS stands for

a) Cascade style sheets

b) Color and style sheets

c) Cascading style sheets

d) None of the above

View Answer

Answer: (c) Cascading style sheets



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

View Answer

Answer: (c) background-color



5. The HTML attribute used to define the inline styles is-

a) style

b) styles

c) class

d) none of the above

View Answer

Answer: (a) style



6. Are the negative values allowed in padding property?

a) Yes

b) No

c) Can't say

d) May be

View Answer

Answer: (b) No



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

View Answer

Answer: (c) class



8. Which of the following has introduced text, list, box, margin, border, color and background properties??

a) HTML

b) PHP

c) CSS

d) Ajax

View Answer

Answer: (c) CSS



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

View Answer

Answer: (b) font-weight:bold



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

View Answer

Answer: (d) font-style



11. How many ways can CSS be used in?

a) 1

b) 2

c) 3

d) 4

View Answer

Answer: (c) 3



12. Placing css inside any html element is called?

a) inline css

b) internal css

c) external css

d) none of above

View Answer

Answer: (a) inline css



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

View Answer

Answer: (c) external css



14. Which HTML tag is used to declare internal CSS?

a) link

b) style

c) script

d) none of above

View Answer

Answer: (c) script



15. How can we select an element with a specific Id in CSS?

a) #

b) .

c) @

d) &

View Answer

Answer: (a) #



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

View Answer

Answer: (b) Top, Right, Bottom, Left



17. The CSS property used to specify the transparency of an element is?

a) filter

b) visibility

c) opacity

d) none of above

View Answer

Answer: (c) opacity



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

View Answer

Answer: (d) none of above



19. Setting an inline-block in CSS requires which of the following properties?

a) display

b) color

c) block

d) none of above

View Answer

Answer: (a) display



20. When CSS was announced?

a) 1991

b) 1993

c) 1990

d) 1994

View Answer

Answer: (d) 1994



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)

View Answer

Answer: (b) background: url(image path)



22. How are custom fonts defined using CSS?

a) @font-face rule

b) @font-style rule

c) src tags rule

d) None of Above

View Answer

Answer: (b) @font-style rule



23. Which of the following are parts of the CSS box model?

a) Margins

b) Padding

c) Border

d) all of above

View Answer

Answer: (d) all of above



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;

View Answer

Answer: (a) text-align:center;



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

View Answer

Answer: (a) Z - index



26. Which of the following are types of length units in CSS?

a) Absolute

b) Relative

c) Both a and b

d) fixed

View Answer

Answer: (a) Absolute



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

View Answer

Answer: (b) background-size:cover



28. Which CSS property is used to create an image reflection?

a) box-reflect

b) image-reflect

c) reflect-image

d) reflect-images

View Answer

Answer: (a) box-reflect



29. How many layout modes were there before the Flexbox Layout Module was introduced in CSS?

a) 1

b) 2

c) 3

d) 4

View Answer

Answer: (d) 4



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

View Answer

Answer: (c) background-color



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

View Answer

Answer: (a) background-repeat:no-repeat



32. The CSS property used to draw a line around the elements outside the border?

a) border

b) outline

c) padding

d) line

View Answer

Answer: (b) outline



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

View Answer

Answer: (a) text-shadow



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

View Answer

Answer: (a) border-collapse



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

View Answer

Answer: (b) border-radius



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

View Answer

Answer: (c) border-spacing



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

View Answer

Answer: (d) max-height



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

View Answer

Answer: (c) line-height



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

View Answer

Answer: (a) order property



40. How can we change the text color of an element?

a) color

b) background-color

c) text-color

d) none of the above

View Answer

Answer: (a) color



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

View Answer

Answer: (b) box-shadow



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

View Answer

Answer: (d) color



43. Which of the following CSS Property controls how an element is positioned?

a) static

b) position

c) fix

d) set

View Answer

Answer: (b) position



44. Which of the following is an appropriate value for the overflow element?

a) scroll

b) hidden

c) auto

d) all of the mentioned

View Answer

Answer: (d) all of the mentioned



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

View Answer

Answer: (c) border



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

View Answer

Answer: (a) text:align



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

View Answer

Answer: (b) z-index



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

View Answer

Answer: (b) overflow-style



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

View Answer

Answer: (a) border-spacing



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

View Answer

Answer: (d) word-break



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

View Answer

Answer: (c) blur()



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

View Answer

Answer: (d) brightness



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

View Answer

Answer: (c) custom



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

View Answer

Answer: (b) grayscale



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()

View Answer

Answer: (c) invert()



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

View Answer

Answer: (c) staturate()



57. Which of the following function defines a linear gradient as a CSS image?

a) grayscale()

b) gradient()

c) image()

d) linear-gradient()

View Answer

Answer: (d) staturate()



58. Which of the following function two dimensional transformation in matrix format?

a) matrix()

b) matrix2d()

c) matrix3d()

d) perspective

View Answer

Answer: (a) matrix()



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()

View Answer

Answer: (b) sepia()



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

View Answer

Answer: (c) text-decoration