[html] changing color of h2

How I can change the color of h2 ?

I have tried <h2 color="#006699">Process Report</h2> but it's not changed and I am still getting this default black colour

Thanks .

This question is related to html

The answer is


Try CSS:

<h2 style="color:#069">Process Report</h2>

If you have more than one h2 tags which should have the same color add a style tag to the head tag like this:

<style type="text/css">
h2 {
    color:#069;
}
</style>

If you absolutely must use HTML to give your text color, you have to use the (deprecated) <font>-tag:

<h2><font color="#006699">Process Report</font></h2>

But otherwise, I strongly recommend you to do as rekire said: use CSS.