HTML And CSS Certification Practice Test

Access More Questions
What property is used to set the color of text in CSS?
Correct Answer:
color
Explanation:
The property used to set the color of text in CSS is "color." It directly influences the color of the text content within an element, allowing designers to specify colors using various formats, such as hexadecimal, RGB, RGBA, HSL, and named colors. This property is essential for creating visually appealing and readable web pages, as it enables designers to align text color with the overall aesthetic and branding of a site. The other properties listed serve different purposes: line-height controls the space between lines of text, font-size determines the size of the text, and font-style is utilized to specify whether the text is normal, italicized, or oblique. None of these properties can change the actual color of the text, which is why they are not suitable answers for the question regarding text color.

Access more questions from this quiz

Continue to HTML and CSS Certification Practice Test for more practice questions and the full quiz experience.

Access More Questions