Which property applies a color to text?
-
text-color
-
foreground-color
-
background-color
-
color
The CSS 'color' property specifically controls text color (foreground color). Option A 'text-color' doesn't exist in CSS. Option B 'foreground-color' also doesn't exist - though it sounds logical, CSS uses the simpler 'color' property name. Option C 'background-color' controls the background, not the text. 'color' is the standard, correct property for text color in CSS.
To answer this question, you need to understand CSS, specifically the properties used to apply color to text.
Option A) text-color - This option is incorrect because there is no CSS property called "text-color". The correct property name is "color".
Option B) foreground-color - This option is incorrect because there is no CSS property called "foreground-color". The correct property name is "color".
Option C) background-color - This option is incorrect because the "background-color" property is used to apply color to the background of an element, not the text itself.
Option D) color - This option is correct because the "color" property is used to apply a color to the text content of an element. This property accepts various color formats such as named colors, hexadecimal values, RGB values, and HSL values.
The correct answer is D) color. This option is correct because the "color" property is specifically designed to apply a color to text.