SQL PHP HTML ASP JavaScript articles and free scripts to download
HTML

HTML Background color in body tag in a page

What 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 font

We 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">

<html>

<head>
<title>This is a demo page to check body background color and text color</title>
<META NAME="DESCRIPTION" CONTENT="Creating a page with black background and white font color">
<META NAME="KEYWORDS" CONTENT="black body Body tag, white font, red link">
</head>

<body bgcolor="#000000" text="#ffffff" link="#ff0000" vlink="#800080" alink="#ff0000">

Welcome to <a href=www.plus2net.com>plus2net.com</a><br>
You are leaning HTML tags here.

</body>
</html>

Demo of Black background and white text

How style CSS is used to manage background color, image

Be the first to post comment on this article :


Google+
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer