HTML Background color in body tag in a pageWhat should be my background color code of any page? Background color code can be defined in the body tag of the html code. You can see the details of body tag at html code structure. The html code is<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000"> See the code bgcolor="#ffffff" in above body tag. This will make the body background color white as #ffffff is he hex value of white color. Same way the hex value of any color can be placed in the body tag and the page color can be changed. To get the hex value of of any color you can use html color chat. Black background and white fontWe will develop a page with black colour background and the text colour should be white. We will also display links on this demo page in red colour. Here is the sample code for this demo. Watch the body tag.<!doctype html public "-//w3c//dtd html 3.2//en">
| ||
| ||