Lesson: HTML5 and CSS
Change the Color of Text
Now let's change the color of some of our text.
We can do this by changing the
style of your
The style that is responsible for the color of an element's text is the "color" style.
Here's how you would set your
h2 element's text color to blue:
<h2 style="color: blue">CatPhotoApp</h2>
h2 element's style so that its text color is red.