HTML Background Color Code

This example code applies a background color to a p tag using the background-color property.


Example Code

<!-- Codes by HTMLmagics -->
<p style="background-color:#0f0;color:black;width:200px;">This text has got a background color applied. You could also apply background color to the whole page if you like.</p>
<p><a  style="font-size:11px;color:#999;" href="http://htmlmagics.blogspot.com
/backgrounds/html-background-color.cfm">HTML background color</a></p>

 

 

Result


This text has got a background color applied. You could also apply background color to the whole page if you like.