In CSS, what property is used to change the text color of an element?

Prepare for the Revature Test with our comprehensive study material. Use flashcards and multiple-choice questions, each with hints and explanations. Get exam-ready now!

The property used to change the text color of an element in CSS is "color." This property allows you to apply a color to the text within an HTML element, thereby controlling its appearance on the webpage. By using the "color" property, you can specify colors using various formats, such as named colors (like "red" or "blue"), hexadecimal codes (like "#FF0000" for red), or RGB/RGBA values.

Other choices such as "font-color" and "text-color” do not exist in CSS, making them invalid options for adjusting text color. The "background-color" property controls the color behind the text, not the text color itself. Understanding the distinction between these properties is crucial for effective styling in CSS.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy