Hi
This is more of a general query as the code works perfectly but I was wanting advice.
When applying class, id or style to a line of code is there a hierarchical order to follow. When I answered the question below I placed id=“orange-text” after class=“pink-text blue-text” and it worked. I was just wondering whether if there is a standard way, e.g. id, class, style…
I am very new to all this so I apologise if this is the wrong place to post this question but it is not clear in the tutorials.
Thank you in advance
Simon
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>
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
.
Challenge: Override Class Declarations with Inline Styles
Link to the challenge: