Solved

HTML, how to put a grey background

Posted on 2012-04-12
3
489 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 167 total points
ID: 37839339
<span style='background:gray'><p>This is a paragraph</p></span>
0
 
LVL 1

Assisted Solution

by:rjccomps
rjccomps earned 167 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 166 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Simple Angular 2 login page 4 75
AngularJS Page Control Understanding 5 39
HTML Relative path 9 29
Wrapper for APPs 9 31
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

912 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now