Add background color for html element

To enable background color for html element, you just need to have a background color set for the html element as shown below:


in the style part of the header or the CSS file.

By doing this, if the html element is a background image of text, you can add background color to the text.

So even if images are turned off, you would still see a background for the text.


To add background color for an html element say “a heading tag”, you can do as shown below:


h1.className {

background: colorĀ url(images/imagename.png);



Leave a Reply

Your email address will not be published. Required fields are marked *