User:
Password:

Home | New Examples | Popular | Top | Submit Examples | Request Examples

For example: Metaphors, hiatuses, adjectives, nouns,...
You are here: Examples10.com > Computer - Programming > CSS > Background color of elements

Examples of Background color of elements


Background color of elements

Post by natttt
Posted on 2011-01-14 14:01:40
Set the background color of a page with this script:

<html>
<head>
<style type="text/css">
h1{background-color:#6495ed;}
p{background-color:#e0ffff;}
div{background-color:#b0c4de;}
</style>
</head>

<body>

<h1>CSS background-color example!</h1>
<div>
This is a text inside a div element.
<p>This paragraph has it"s own background color.</p>
We are still in the div element.
</div>

</body>
</html>



Is this example useful?
 (50%) YES    NO (50%)


To share this example, copy and paste this code into your website, blog or forum:


Comments
To leave a comment, you must register for free or if you are already registered log in.

Has not written any comments yet.


Related examples
Position a background image with CSS Posted on 2011-01-14 14:02:53
How to position a background image, here one example: <html> <head> <style type="text/css"> body{ background-image:url("...
Background color of a page Posted on 2011-01-14 14:00:31
Set the background color of a page with this script: <html> <head> <style type="text/css"> body { background-color:#b0c4d...
© 2010 Examples10.com · Compilation of examples, samples with definitions of all free   Legal Notice | Contact | Pending

eXTReMe Tracker