Specify color for font using CSS

Explanation

To specify color for font using CSS, use the color property. You can specify color name or color code.

Sample Code [Output]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=shift_jis">
<title>Sample</title>
<style type="text/css"><!--
.importText {
color:#f00;
}
--></style>
</head>
<body>
<h1>Sample</h1>
<p>
You can <span class="importText">specify the color</span> of a font.
</p>
</body>
</html>