954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How do i set a page background color?

how do i make the backround of the page a different color than the centered text just like on the page i mentioned in my first post?

cuddlers89
Junior Poster in Training
57 posts since Mar 2004
Reputation Points: 11
Solved Threads: 0
 

Well it works like this.

<HTML>

<Head>
<title>Zorba</title>
</head>
<Body bgcolor = (hexadecimal code referring to your background colour of choice!)>

annnd for the table

<table width="90%" align="center" bgcolor =(hexadecimal code referring to your background colour of choice!)>
<tr><td align="left" valign="top">
 
	 PAGE CONTENT HERE
 
</td></tr>
</table></body>
</html>



hexidecimal values can be found at http://www.december.com/html/spec/color.html or http://www.web-source.net/216_color_chart.htm , give us the link to your site so I can check it out :D

Happy coding!

Slade

Slade
Practically a Master Poster
633 posts since Mar 2004
Reputation Points: 115
Solved Threads: 7
 

replace (hexadecimal code referring to your background colour of choice!)

with a hexidecimal value, such as

<body bgcolor = #FFFFFF>



will produce a white background

Slade
Practically a Master Poster
633 posts since Mar 2004
Reputation Points: 115
Solved Threads: 7
 

Just for cuddlers89 's information: You don't necessarily need a hexidecimal code for color, you can also use the color name for most basic colors like white red blue black green yellow orange; etc. :)

rixius
Posting Whiz in Training
233 posts since Nov 2003
Reputation Points: 12
Solved Threads: 3
 

lol, for my information as well, I didn't know that

Slade
Practically a Master Poster
633 posts since Mar 2004
Reputation Points: 115
Solved Threads: 7
 

You can also use style sheets:

<html>
<head>
<style>
body {
   background: colour name or hex value;
}

for tables:

table {
   background: colour name;
}
</style>
</head>


You can also link to external style sheets.

liliafan
Junior Poster
117 posts since Apr 2004
Reputation Points: 66
Solved Threads: 3
 
lol, for my information as well, I didn't know that


Hey This thread is old but Here is something new for new HTML comers learn Html tags for background image . I hope you will enjoy learning HTML in easy way.

tarwara
Newbie Poster
8 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You