Changing background in css

Trying to change the color of only the first <p> not both.

needed the url
https://www.codecademy.com/practice/tracks/learn-css/modules/learn-css-selectors-visual-rules?redirect_url=%2Flearn%2Flearn-css

Hi there, welcome to the forums.

I’m sorry, but I don’t quite understand what it is that you’re trying to change the colour of? Can you show me what you mean with a code sample or screenshot? :slight_smile:

(You can learn about how to post correctly formatted code here)

Do you mean background color, or text color?
Either way you can single out a specific <p>, or any element for that matter, to style using an id.

HTML

<p id="20Pixel"> 
  This paragraph will have a font size of 20 pixels.
</p>

<p>
  This paragraph won't have a font size of 20 pixels.
</p>

CSS

#20Pixel {
  font-size: 20px;
}