Change Text Color With CSS

How to: Change Text Color With CSS

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on email

By adding the following code to the <style>

body {
color: blue;
}

h1 {
color: green;
}

 

And the following code to the <body>

 

<body>

<h1>This is heading 1</h1>
<p>This is an ordinary paragraph. Notice that this text is blue. The default text color for a page is defined in the body selector.</p>

</body>

 

You will change the color to the color that is specified in the style. There are lots of different colors that can be chosen from, so choose what ever color you love!