Colors are very important to give a good look and feel to your website. You can specify colors on page level using <body> tag or you can set colors for individual tags.
The color attribute specifies the color of the text inside a <font> element.
For example:
<html> <head> <title>This is title</title> </head> <body> <font color="red">Old lorem text</font> <font color="Blue">new lorem text</font> </body> </html>
The <body> tag has following attributes which can be used to set different colors:
- bgcolor:Â Sets a color for the background of the page.
- text:Â Sets a color for the body text.
- alink:Â Sets a color for active links or selected links.
- link:Â Sets a color for linked text.
- vlink: Sets a color for visited links – that is, for linked text that you have already clicked on.
NOTE:Â It is recommended to use CSS to set background or text colors.