36.3k views
2 votes
Which CSS attribute would change an element’s font color to blue?

a) text-color: blue;
b) font-color: blue;
c) color: blue;
d) style: blue;

User Clintm
by
8.1k points

1 Answer

2 votes

Final answer:

To change an element's font color to blue in CSS, you use c) color: blue; which is applied to text within an element.

Step-by-step explanation:

The CSS attribute to change an element's font color to blue is c) color: blue;. The color property is used for setting the color of the text inside an element. You can specify the color in different ways such as using color names (blue), hexadecimal values (#0000FF), RGB values (rgb(0, 0, 255)), or HSL values (hsl(240, 100%, 50%)). Here's an example of how you'd use it in CSS to apply to a paragraph element:

p {
color: blue;
}

User Fhnaseer
by
7.8k points