HTML

HTML Projects

HTML Project

Html colors
Previous Home Next
adplus-dvertising

Color is most important feature to provide a good look and feel to your website and color are using in <body> tag then set color for individual tags using bg color.

  1. bgcolor-set color for body text.
  2. text-set color for body text.
  3. alink-set a color for active links or selected liks.
  4. link-set acolor for linked text.
  5. vlink-set a color for visited links-

Exampl

<!DOCTYPE html>
<html>
<head>
<title>HTML Colors by Name</title>
</head>
<body text="blue" bgcolor="burlywood">
<p>Here we use different color names for body and table and see the result.</p>
<table bgcolor="black">
<tr>
<td>
<font color="white">This text will appear white on black background.</font>
</td>
</tr>
</table>
</body>
</html

Output :

HTML Color coding method

There are three type method for set colors web page.

  1. Color names: to use green,blue,red color names directly. W3C standard provide 16 colors to set background color etc.
  2. Hex codes: A six digit code set the color like as red ,green, blue.
  3. Color decimal or percentage values: using rgb( ) property.
Previous Home Next