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