Tuesday, August 20, 2013

CSS text color

<html>
<head>
<style type="text/css">
body {color:red}
h1 {color:#00cc00}
p.ex {color:rgb(0,0,255)}
</style>
</head>

<body>
<h1>This is heading 1</h1>
<p>This is an ordinary paragraph. Notice that this text is red. The default text-color for a page is defined in the body selector.</p>
<p class="ex">This is a paragraph with class="ex". This text is blue.</p>
</body>
</html>

Result


No comments: