Background Color

Example Code




<!-- Codes by HTMLmagics -->
<p style="background-color:yellow;">Background color defined using the color name.</p>
<p style="background-color:#ffff00;">Background color defined using its hexadecimal value.</p>
<p style="background-color:#ff0;">Background color defined using its shorthand hexadecimal value.</p>
<p style="background-color:rgb(255,255,0);">Background color defined using the RGB color value.</p>
<p style="background-color:rgb(100%,100%,0%);">Background color defined using the RGB color percentage value.</p>
<p><a  style="font-size:11px;color:#999;" href="http://htmlmagics.blogspot.com/color/html-color-codes.cfm">HTML color codes</a></p>


Result







Background color defined using the color name.

Background color defined using its hexadecimal value.

Background color defined using its shorthand hexadecimal value.

Background color defined using the RGB color value.

Background color defined using the RGB color percentage value.

HTML color codes