Override Class Declarations with Inline Styles 101

Override Class Declarations with Inline Styles 101
0

#1

i gave my element an inline, however, i don’t know how to turn my text white. I tried to add it to the id, but it didn’t work

Your code so far


<style>
  body {
    background-color: black;
    font-family: monospace;
    color: green;
  }
  #orange-text {
    color: orange;
  }
  .pink-text {
    color: pink;
  }
  .blue-text {
    color: blue;
  }
</style>
<h1 id="orange-text" class="pink-text blue-text">Hello World!</h1>
<h1 style="color: white;">
  

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 10718.88.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.118 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/override-class-declarations-with-inline-styles


#2

You have the right idea with <h1 style="color: white;">, you just need to put the style part of that into the first h1 tag (the one that surrounds Hello World!, since that’s what you’re trying to change the color of), so it becomes <h1 id="orange-text" class="pink-text blue-text" style="color: white;">Hello World!</h1>.

Hope this helps :slight_smile:


#3

thank you so much !! helped a lot !!