HTML, how to put a grey background

Given the line

<p>This is a paragraph</p>

How would I introduce a grey background
Los Angeles1Asked:
Who is Participating?
 
AnuroopsunddCommented:
<span style='background:gray'><p>This is a paragraph</p></span>
0
 
rjccompsCommented:
<html>
<body bgcolor ="gray">

<p>This is a paragraph</p>
</body>
</html>

Open in new window

0
 
bigeven2002Commented:
Hello,

This can be achieved by embedding CSS into the Paragraph tag.
<p style="background-color:#CCC;"> This is a paragraph </p>

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.