Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

HTML, how to put a grey background

Posted on 2012-04-12
3
Medium Priority
?
502 Views
Last Modified: 2012-04-12
Given the line

<p>This is a paragraph</p>

How would I introduce a grey background
0
Comment
Question by:Los Angeles1
3 Comments
 
LVL 17

Accepted Solution

by:
Anuroopsundd earned 668 total points
ID: 37839339
<span style='background:gray'><p>This is a paragraph</p></span>
0
 
LVL 1

Assisted Solution

by:rjccomps
rjccomps earned 668 total points
ID: 37839349
<html>
<body bgcolor ="gray">

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

Open in new window

0
 
LVL 17

Assisted Solution

by:bigeven2002
bigeven2002 earned 664 total points
ID: 37839350
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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question