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 .
Option #2: Use CSS selectors When there's a space, the selector h2 . red-text is telling the browser to target the element with the class red-text that's child of h2 . However, the H2 element doesn't have a child – you're trying to style the H2 element itself.
But isn't hydrogen a colourless gas? Yes, hydrogen is an invisible gas.
You could go to or use the source-view of the post (when editing). Then find the <h1> <h2> or any heading element you want to change its color, then style it by e.g: <h3 style="color: red;">Heading 3</h3> for example.
To set the font color in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property color. HTML5 do not support the <font> tag, so the CSS style is used to add font color.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With