CSS MCQ Test: CSS MCQs - Practice Questions
1. Which CSS property is used to create a border around an element?
2. What is the purpose of the CSS property 'font-size'?
3. What does the 'opacity' property in CSS control?
4. In CSS, what is the purpose of the 'max-width' property?
5. What is the CSS box model used for?
6. What is the purpose of the CSS property 'z-index'?
7. In CSS, what is the default value of the 'position' property?
8. What is the purpose of CSS selectors?
9. In CSS, what is the purpose of the 'display' property with a value of 'inline-block'?
10. In CSS, what does the 'display' property value 'inline-block' do?
11. What is the default value of the 'display' property in CSS for most HTML elements?
12. How can you include an external CSS file in an HTML document?
13. What is the CSS property used to control the size of an element relative to its parent container?
14. Which CSS property is used to set the font size of text?
15. What is the CSS property used to specify the color of an element's text?
16. Which CSS selector is used to select elements with a specific class?
17. What does the 'overflow' property in CSS control?
18. Which CSS property is used to control the style of the border of an element?
19. What is the purpose of the 'visibility' property in CSS?
20. What is the CSS property used to control the appearance of an element when the user hovers over it?
21. In CSS, how can you make an element transparent, allowing the background to show through?
22. What is the specificity of the following CSS selector: div#header .nav ul li a.active?
23. Which CSS property is used to control the alignment of text within an element?
24. What is the purpose of the CSS property 'margin'?
25. Which CSS property is used to control the background color of an element?
26. What does the CSS property 'margin' control?
27. Which CSS property is used to control the space between elements?
28. In CSS, how can you select all elements with a class attribute equal to 'special'?
29. In CSS, what is the 'box model'?
30. Which CSS property is used to control the positioning of an element within its containing element?
31. In CSS, what is the purpose of the 'clearfix' class?
32. Which CSS property is used to control the color of text in an element?
33. What is the purpose of the CSS property 'height'?
34. In CSS, what is the purpose of the 'grid' layout model?
35. Which CSS property is used to control the spacing between characters in text?
36. What is the purpose of the 'transform' property in CSS?
37. Which CSS property is used to control the visibility of an element?
38. What does the 'text-decoration' property in CSS control?
39. What is the purpose of the CSS property 'float'?
40. Which CSS property is used to control the spacing between lines of text within an element?
41. In CSS, what is the purpose of the 'flexbox' layout model?
42. What is the purpose of the CSS property 'text-align'?
43. What does the 'margin' property in CSS control?
44. Which CSS property is used to set the background color of an element?
45. Which CSS property is used to control the space between lines of text within an element?
46. Which CSS property is used to create rounded corners on an element's border?
47. In CSS, what does the 'float' property control?
48. Which CSS property is used to control the spacing between letters in text?
49. What does CSS stand for?
50. What is the purpose of the CSS property 'opacity'?