Solved

HTML, how to put a grey background

Posted on 2012-04-12
3
498 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

617 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