HTML and CSS Certification 2025 – 400 Free Practice Questions to Pass the Exam

Question: 1 / 400

What property is used to set the color of text in CSS?

line-height

font-size

color

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.

Get further explanation with Examzify DeepDiveBeta

font-style

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy