Previous | Home | Next |
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.
- bgcolor-set color for body text.
- text-set color for body text.
- alink-set a color for active links or selected liks.
- link-set acolor for linked text.
- 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 :
There are three type method for set colors web page.
- Color names: to use green,blue,red color names directly. W3C standard provide 16 colors to set background color etc.
- Hex codes: A six digit code set the color like as red ,green, blue.
- Color decimal or percentage values: using rgb( ) property.
Previous | Home | Next |