1. Which CSS property controls the text size?
- a) font-size
- b) text-size
- c) size
- d) text-style
font-size sets the size of the font (e.g., 16px, 1rem).
Test your knowledge of CSS with these interactive multiple-choice questions.
1. Which CSS property controls the text size?
font-size sets the size of the font (e.g., 16px, 1rem).
2. Which CSS property changes the font family?
font-family specifies prioritized font names (e.g., Arial, sans-serif).
3. Which CSS property makes text bold?
font-weight: bold or numeric values like 700 create bold text.
4. Which CSS property adds space between letters?
letter-spacing: 2px increases space between characters.
5. Which CSS property aligns text horizontally?
text-align: center|left|right|justify controls horizontal alignment.
6. Which CSS property underlines text?
text-decoration: underline adds an underline.
7. Which CSS property transforms text to uppercase?
text-transform: uppercase converts text to all caps.
8. Which CSS property sets the line height?
line-height: 1.5 defines space between lines.
9. Which CSS property indents the first line of a paragraph?
text-indent: 20px indents the first line.
10. Which CSS property adds shadow to text?
text-shadow: 2px 2px 4px #000 creates text shadows.
11. Which CSS property changes the cursor type?
cursor: pointer|wait|crosshair changes the mouse cursor.
12. Which CSS property hides an element but keeps its space?
visibility: hidden hides content while preserving layout space.
13. Which CSS property creates rounded corners?
border-radius: 10px rounds element corners.
14. Which CSS property adds space outside an element?
margin: 20px adds space outside the border.
15. Which CSS property adds space inside an element?
padding: 10px adds space inside the border.
16. Which CSS property sets the background color?
background-color: #fff sets the element's background color.
17. Which CSS property adds a background image?
background-image: url('image.jpg') sets a background image.
18. Which CSS property repeats a background image?
background-repeat: repeat|no-repeat|repeat-x|repeat-y controls tiling.
19. Which CSS property positions a background image?
background-position: center top aligns the image.
20. Which CSS property sets the border style?
border-style: solid|dashed|dotted defines the border appearance.