Practice
Resources
Contests
Online IDE
New
Free Mock
Events New Scaler
Practice
Improve your coding skills with our resources
Contests
Compete in popular contests with top coders
logo
Events
Attend free live masterclass hosted by top tech professionals
New
Scaler
Explore Offerings by SCALER

CSS MCQ

Last Updated: Jan 08, 2024
Certificate included
About the Speaker
What will you Learn?
Register Now

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

1. 

The full form of CSS is:

Create a free personalised study plan Create a FREE custom study plan
Get into your dream companies with expert guidance
Get into your dream companies with expert..
Real-Life Problems
Prep for Target Roles
Custom Plan Duration
Flexible Plans
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?

Explore InterviewBit’s Exclusive Live Events
Explore Exclusive Events
By
No More Events to show!
No More Events to show!
No More Events to show!
No More Events to show!
Certificate included
About the Speaker
What will you Learn?
Register Now
7. 

Which HTML tag is used to declare internal CSS?

Start Your Coding Journey With Tracks Start Your Coding Journey With Tracks
Master Data Structures and Algorithms with our Learning Tracks
Master Data Structures and Algorithms
Topic Buckets
Mock Assessments
Reading Material
Earn a Certificate
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?

Discover your path to a   Discover your path to a   Successful Tech Career for FREE! Successful Tech Career!
Answer 4 simple questions & get a career plan tailored for you
Answer 4 simple questions & get a career plan tailored for you
Interview Process
CTC & Designation
Projects on the Job
Referral System
Try It Out
2 Lakh+ Roadmaps Created
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?

Excel at your interview with Masterclasses Know More
Certificate included
What will you Learn?
Free Mock Assessment
Fill up the details for personalised experience.
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
Graduation Year *
Graduation Year *
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
2028
2029
*Enter the expected year of graduation if you're student
Current Employer
Company Name
College you graduated from
College/University Name
Job Title
Job Title
Engineering Leadership
Software Development Engineer (Backend)
Software Development Engineer (Frontend)
Software Development Engineer (Full Stack)
Data Scientist
Android Engineer
iOS Engineer
Devops Engineer
Support Engineer
Research Engineer
Engineering Intern
QA Engineer
Co-founder
SDET
Product Manager
Product Designer
Backend Architect
Program Manager
Release Engineer
Security Leadership
Database Administrator
Data Analyst
Data Engineer
Non Coder
Other
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