CSS and HTML 5 – Colors

You can do some interesting things with color on your HTML pages with color options with CSS.

color.html

<html>
<head>
<link rel="stylesheet" href="colorStyle.css" />
</head>
<body>

<h1 class="named">This is NAMED COLOR text</h1>

<h1 class="hex">This is a HEX color</h1>

<h1 class="rgb">This is a RGB color</h1>

</body>
</html>

colorStyle.css

.named {
	color: cyan;
}

.hex {
	color: #ff751a;
}

.rgb {
	color: rgb(60, 127, 247);
}

Be the first to comment

Leave a Reply