Changing Text Color
To change the color of text, you use the color
CSS property.
Let's add the color property to the intro class to change the text color to blue.
Changing text to blue using the color property
.intro {
font-weight: normal;
font-size: 20px;
line-height: 1.8;
color: blue;
}
You can see that the text inside an h1 tag has changed to blue.
If you prefer a different color, try changing color to grey, green, or any other color you like.
If you remove the color property, the text will revert to black.
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.