CSS - cascading style sheets, backgrounds, colours, fonts, borders, boxes, margins, padding, positioning, class and id selectors - Question Bank
1. What is the purpose of the CSS `!important` rule?
2. Which CSS property is used to control the overflow of content that exceeds the element's box?
3. What is the CSS shorthand property for setting all four margins (top, right, bottom, left) in order?
4. Which CSS property allows an element to occupy space but not be displayed?
5. What does the CSS property 'text-decoration: none;' do?
6. Which CSS property is used to control the spacing between letters?
7. What does the CSS selector `div > p` match?
8. What is the CSS property for setting the background position?
9. Which CSS property is used to set the style of the outline around an element?
10. What does the CSS pseudo-class ':hover' apply to?
11. Which CSS property is used to set the color of the text's outline?
12. What is the CSS property for setting the height of an element?
13. Which CSS property is used to set the width of an element?
14. What does the CSS property 'opacity: 0;' do?
15. What is the CSS property for setting the vertical positioning of absolutely positioned elements?
16. Which CSS property is used to set the vertical alignment of text within an element?
17. What does the CSS property 'float: left;' do?
18. Which CSS property is used to create a text shadow?
19. What is the CSS property for setting the horizontal positioning of absolutely positioned elements?
20. Which CSS property is used to set the background image of an element?
21. What does the CSS 'border-radius' property do?
22. Which CSS property controls the spacing between lines of text?
23. What is the CSS selector that targets elements that are direct children of another element?
24. Which CSS property is used to control the visibility of an element?
25. What is the CSS property for setting the color of the background image?
26. Which CSS property is used to set the font family (e.g., Arial, Times New Roman)?
27. What does `display: inline-block;` do in CSS?
28. Which CSS property allows you to stack elements that overlap using the z-axis?
29. What is the default value of the CSS 'position' property?
30. Which CSS property specifies the color of the border?
31. What is the CSS property for setting the font style (e.g., italic)?
32. Which CSS property is used to set the color of text?
33. What does `position: fixed;` in CSS do?
34. Which CSS property is used to control the alignment of text within an element?
35. What is the CSS 'box model' composed of?
36. Which CSS property is used to add space inside the border of an element?
37. What is the correct CSS syntax for selecting an element with the ID 'main-content'?
38. Which CSS property is used to specify the width of an element's border?
39. What does the CSS property 'display: inline;' do?
40. Which CSS property is used to control the repetition of a background image?
41. What is the default font-family for most web browsers?
42. Which CSS property is used to set the style of the border around an element?
43. What is the correct CSS syntax for selecting all elements with the class 'example'?
44. What does the CSS property 'position: absolute;' do?
45. Which CSS property is used to add space outside the border of an element?
46. What is the purpose of the 'box-sizing' property in CSS?
47. Which CSS property is used to make text bold?
48. What is the default value for the CSS 'display' property for a `<div>` element?
49. Which CSS property controls the text size of an element?
50. Which property is used to change the background color of an element in CSS?