freeCodeCamp Challenge Guide: Override Class Declarations with Inline Styles

Override Class Declarations with Inline Styles


Problem Explanation

We need to use an inline style to try to make our h1 element white.

Example:

Inline styles look like this:

<h1 style="color: green;">

NOTE: An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly.


Solutions

Solution 1 (Click to Show/Hide)

In this line:

<h1 id="orange-text" class="pink-text blue-text">Hello World!</h1>

In opening tag <h1> we need to add inline style to make our h1 element white:

<h1 style="color: white;" id="orange-text" class="pink-text blue-text">Hello World!</h1>
6 Likes

So i believe i have this exactly how it should be but it isnt letting me complete it. Keeps saying “Your h1 element should have the id of orange-text” Which it still does from the previous task so i dont know why it would say that it doesnt anymore. I looked and it is still there so i dont know what the problem would be.

Never mind everyone I figured it out.

How’d you figure it out? I just got to this part. Even though I’ve tried the correct format it still says that it’s wrong?

2 Likes

Nevermind… just got it