CSS MCQ Questions
Our website provides a collection of CSS (Cascading Style Sheets) MCQs to help learners practice and understand web design concepts. Questions cover topics like selectors, properties, layouts, colors, fonts, animations, and responsive design. Each question includes clear explanations to help users grasp key ideas quickly. Perfect for students, web developers, and job aspirants, this platform makes learning CSS easier and better prepares users for exams and interviews.
Q1. Which property is used to change the text color in CSS?
A. font-color
B. color
C. text-color
D. background-color
π View Explanation
Q2. Which CSS property controls the size of text?
A. text-style
B. font-size
C. text-size
D. font-style
π View Explanation
Q3. Which of the following is the correct way to add an external CSS file?
A. <style src="style.css">
B. <link rel="stylesheet" href="style.css">
C. <css src="style.css">
D. <stylesheet>style.css</stylesheet>
π View Explanation
Q4. Which CSS property is used to set background color?
A. color
B. bgcolor
C. background-color
D. background
π View Explanation
Q5. What is the default position value of an HTML element in CSS?
A. absolute
B. relative
C. static
D. fixed
π View Explanation
Q6. Which CSS property is used to control the spacing between lines of text?
A. letter-spacing
B. line-height
C. word-spacing
D. text-indent
π View Explanation
Q8. Which property makes text bold in CSS?
A. text-weight
B. font-style
C. font-weight
D. text-bold
π View Explanation
Q9. Which property is used to create space inside an elementβs border?
A. margin
B. padding
C. spacing
D. border-spacing
π View Explanation
Q10. Which property is used to create space outside an elementβs border?
A. margin
B. padding
C. outline
D. spacing
π View Explanation
Q11. Which CSS property is used to change the type of cursor?
A. cursor
B. pointer
C. mouse
D. hover
π View Explanation
Q12. Which pseudo-class is used to style a link when hovered?
A. :visited
B. :hover
C. :link
D. :active
π View Explanation
Q13. Which CSS function is used to apply a gradient background?
A. gradient()
B. background-gradient()
C. linear-gradient()
D. color-gradient()
π View Explanation
Q14. Which CSS property makes text italic?
A. font-weight
B. font-style
C. text-transform
D. text-decoration
π View Explanation
Q15. Which property controls the visibility of an element without removing space?
A. display
B. opacity
C. visibility
D. hidden
π View Explanation
Q16. Which CSS property defines the transition effect duration?
A. animation-time
B. transition-duration
C. transition-time
D. duration
π View Explanation
Q17. Which layout module is used to design responsive layouts in CSS?
A. Grid
B. Flexbox
C. Float
D. Table
π View Explanation
Q18. Which property in CSS is used to make a text all uppercase?
A. text-transform
B. font-variant
C. text-decoration
D. letter-spacing
π View Explanation
Q19. Which CSS property adds shadow to text?
A. box-shadow
B. shadow
C. text-shadow
D. font-shadow
π View Explanation
Q20. Which property is used to control how an element is displayed?
A. display
B. position
C. float
D. visibility
π View Explanation