Changing background in css

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

needed the url

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.


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

  This paragraph won't have a font size of 20 pixels.


#20Pixel {
  font-size: 20px;