<body bgcolor="#ff69b4"> - background color for the page as a whole.
<body text="#808080"> - text color for the page as a whole.
<body link="#adff2f"> - unvisited link color for the page as a whole.
<body vlink="#ff6600"> - visited link color for the page as a whole.
<body alink="#adff2f"> - activated link color.
<font color="#cc6600"> - color of selected text within a page.
<table bgcolor="#808080"> - background color for an entire table.
<tr bgcolor="#adff2f"> - background color for one rows cell within a table.
<th bgcolor="#ff6600"> - background color for one header cell within a table.
<td bgcolor="#ff69b4"> - background color for one data cell within a table.
Html color codes are not recommended !!!
Deprecated. Use styles instead !!!
How to use HTML color code in CSS styles?
How to add styles to the html document?
1. You can add color by using an external style sheet.
<link rel="stylesheet" href="style.css" />
2. XML version.
<?xml-stylesheet type="text/css" href="style.css"?>
3. Inside the header <HEAD>...</HEAD> for (X)HTML
<style type="text/css">.... css code color....</style>
4. This CSS example sets color for the text in a specific paragraph.
<p style="color: red">Lorem ipsum</p>
5. HTML5 /* Recommended :) */
<link rel="stylesheet" href="style.css"/>
External CSS style sheet.
Background color for the page as a whole.
body {
background-color: #ffe4c4;
background: #ffe4c4; /* CSS3 */
}
Text color for the page as a whole.
body {
color:#808080;
}
Colors links.
a:link { /* a normal, unvisited link */
color:#FF0000;
}
a:visited { * a link the user has visited */
color:#00FF00;
}
a:hover { /* a link when the user mouses over it */
color:#FF00FF;
}
a:active { /* a link the moment it is clicked */
color:#0000FF;
}
Color of selected text within a page.
h1{
color:#cc6600
}
Background color for an entire table.
table {
background-color:#808080
}
Background color for one rows cell within a table.
tr{
background-color:#adff2f
}
Background color for one header cell within a table.
th{
background-color:#ff6600
}
Background color for one data cell within a table.
td{
background-color:#ff69b4
}
Color of paragraph.
p{
color: #ff00ff
}
