206k views
5 votes
Which CSS attribute would change an element's font color to blue

User Srecnig
by
6.3k points

2 Answers

4 votes
body {
color:blue;
}

h1 {
color:blue;
}

These will change both the h1 and the body fonts to blue.
User Compizfox
by
8.1k points
2 votes

Answer:

The "color" atribute

Step-by-step explanation:

The color attribute of CSS defines the color value of an element with its text content and decorations (styles). It also sets the currentcolor's value, where an indirect value from another property can be used, and defaults to the colors of other properties (while not defined), such as the border-color property.

body {

color: black;

}

h1 {

color: red;

}

h2 {

color: #00ff00;

}

User Yuriy Luchaninov
by
6.9k points