Co-Authored By:
Asked by: Zakiya Casasempere
technology and computing web design and htmlHow do you show background color in HTML?
To add a background color to a webpage you canuse the <body bgcolor="######"> attribute. It specifies acolor for the HTML document to display. You canchange the color by replacing ###### with a hexadecimalvalue. For simple colors you can also use the word, such as“red” or “black”.
In this way, how do I add background color in HTML?
Method 2 Setting a Solid Background Color
- Find your document's "html" header.
- Add the "background-color" property to the "body" element.
- Add your desired background color to the "background-color"property.
- Review your "style" information.
- Use "background-color" to apply background colors to otherelements.
Color Name | Hex Code RGB | Decimal Code RGB |
---|---|---|
Maroon | 800000 | 128,0,0 |
Red | FF0000 | 255,0,0 |
Orange | FFA500 | 255,165,0 |
Yellow | FFFF00 | 255,255,0 |
Keeping this in consideration, what is HTML color code?
List of common HTML color codes
Color Name | Hex Color Code | RGB Color Code |
---|---|---|
White | #FFFFFF | rgb(255, 255, 255) |
Silver | #C0C0C0 | rgb(192, 192, 192) |
Gray | #808080 | rgb(128, 128, 128) |
Black | #000000 | rgb(0, 0, 0) |
The <font> tag is not supported inHTML5. Use CSS instead. The <font> tagspecifies the font face, font size, and colorof text.