Practice
Resources
Contests
Online IDE
New
Free Mock
Scaler Events New
Practice
Improve your coding skills with our resources
Contests
Compete in popular contests with top coders
Scaler
Explore Offerings by SCALER
Events
Checkout Scaler Academy Events
New

CSS MCQ

CSS stands for Cascading Style Sheets. It describes the manner in which HTML elements are to be displayed on the screen, paper, or in other media. Using CSS, we can control and change the appearance/layout of multiple websites at the same time. External stylesheets are stored in .css files.

CSS allows us to separate the basic layout of a webpage from its styling and attributes, allowing us to manage our design into effective chunks of code. This is a principle of “Separation of Concern” which allows us to design more complex websites efficiently.

CSS syntax has statements that have 2 parts, a selector and a declaration block.

The Selector points to some HTML element which we want to style. The Declaration block consists of multiple declarations which are separated by semicolons. The declarations are of the form propertyName: value and are enclosed within curly braces.

CSS MCQs

Events | Powered By
1. 

The full form of CSS is:

2. 

How can we change the background color of an element?

3. 

How can we change the text color of an element?

4. 

In how many ways can CSS be written in?

5. 

What type of CSS is the following code snippet?

7. 

Which HTML tag is used to declare internal CSS?

8. 

How can we select an element with a specific ID in CSS?

9. 

How can we select an element with a specific Class in CSS?

10. 

How can we write comments in CSS?

11. 

In the below code snippet, in what order will the margins be added?

12. 

Can negative values be allowed in padding property?

13. 

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

14. 

How can we specify the spacing between each letter in a text in CSS?

15. 

What is the correct syntax for referring an external CSS?

16. 

Which of the following are valid ways to represent a colour in CSS?

17. 

Which of the following is the correct way to select all h1 headers in a div element?

18. 

We can make rounded borders around elements using which CSS element?

19. 

How can we set the maximum width of the elements content box using CSS?

20. 

Which CSS property is used to specify different border styles?

21. 

Which of the following property specifies the look and design of an outline?

22. 

Which of the following are valid CSS position property values?

23. 

What does the inherit value for a property do?

24. 

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

25. 

Which of the following CSS property is used for controlling the layout?

26. 

Which of the following CSS property specifies the origin of the background image?

27. 

How are custom fonts defined using CSS?

28. 

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

29. 

Which of the following components of the CSS box model are transparent?

30. 

What will be the width of the div element given below?

31. 

Which of the following can be achieved with CSS lists?

32. 

Which of the following CSS property specifies the type of list item marker?

33. 

What value should be passed to the width parameter if we want an element, say a table, to span the entire width of the screen?

34. 

Which of the following properties is used to align text in CSS?

35. 

Which of the following is the correct approach to make a table responsive?

36. 

Which of the following CSS properties specifies the stack order of elements?

37. 

Which of the following CSS property creates a clipping region and specifies the visible area of the element?

38. 

What are the uses of CSS pseudo-elements?

39. 

How can we select elements with a specified attribute in CSS?

40. 

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

41. 

Which of the following are units of relative length in CSS?

42. 

What parameter does the calc() function in CSS take?

43. 

How can we add more importance to a property/value than normal?

44. 

Which CSS property specifies the painting area of the background?

45. 

What are the different types of gradients in CSS?

46. 

Which CSS property is used to create an image reflection?

47. 

The transparent keyword is equivalent to which RGBA() value in CSS?

48. 

What function is used to insert values of a CSS variable?

49. 

What is the general syntax of writing the var() function?

50. 

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

Get Placed at Top Product Companies with Scaler Know More 
Get Placed at Top Product Companies with Scaler Know More 
Get Placed at Top Product Companies with Scaler
Sat transparent 640a34d454880bf68e3bfdf33f2389f2214043f59ad18b4c7f7b114e834fb257.svg

Point markers b3add1cc88e4996b2df6e0aedb9f0d1b65fa73c51b7ada8fbee3895a2aa11802.svg Personalised feedback report with solutions
Point markers b3add1cc88e4996b2df6e0aedb9f0d1b65fa73c51b7ada8fbee3895a2aa11802.svg Real life Interview Questions
Point markers b3add1cc88e4996b2df6e0aedb9f0d1b65fa73c51b7ada8fbee3895a2aa11802.svg Identify exact topics to improve

Your feedback is important to help us improve.
Free Mock Assessment
Fill up the details for personalised experience.
All fields are mandatory
Current Employer *
Enter company name *
Graduation Year *
Select an option *
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
Graduation Year *
Graduation Year *
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
*Enter the expected year of graduation if you're student
Current Employer *
Company Name *
Please verify your phone number
Edit
Resend OTP
By clicking on Start Test, I agree to be contacted by Scaler in the future.
Already have an account? Log in
Free Mock Assessment
Instructions from Interviewbit
Start Test