Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set background color and background image by HTML

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to set the background color and background image of HTML, Xiaobian thinks it is very practical, so share it with you as a reference, I hope you can gain something after reading this article.

HTML color

The colors are a mixture of red, green and blue.

color values

Color is defined by a hexadecimal symbol consisting of red, green, and blue values (RGB).

The minimum value for each color is 0 (hexadecimal: #00). The maximum value is 255 (hexadecimal: #FF).

For example, hexadecimal #000000 corresponds to rgb(0,0,0), hexadecimal #FFFFF corresponds to rgb(255,255,255).

web-safe colors

A few years ago, when most computers supported only 256 colors, a series of 216 Web-safe colors were proposed as Web standards. The reason for this is that Microsoft and Mac operating systems use 40 different reserved fixed system colors (about 20 each).

We're not sure how meaningful this is today, as more and more computers are capable of processing millions of colors, but the choice is yours.

216 Cross-platform colors

Initially, 216 cross-platform web-safe colors were used to ensure that all computers correctly displayed all colors when using the 256 color palette.

color name

Most browsers support color name collections.

Note: There are only 16 color names supported by the W3C HTML4.0 standard.

They are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow.

If you want to use other colors, you need to use hexadecimal color values.

Attachment: Color Name Collection

#F0F8FF:AliceBlue

#FAEBD7:AntiqueWhite

#00FFFF:Aqua

#7FFFD4:Aquamarine

#F0FFFF:Azure

#F5F5DC:Beige

#FFE4C4:Bisque

#000000:Black

#FFEBCD:BlanchedAlmond

#0000FF:Blue

#8A2BE2:BlueViolet

#A52A2A:Brown

#DEB887:BurlyWood

#5F9EA0:CadetBlue

#7FFF00:Chartreuse

#D2691E:Chocolate

#FF7F50:Coral

#6495ED:CornflowerBlue

#FFF8DC:Cornsilk

#DC143C:Crimson

#00FFFF:Cyan

#00008B:DarkBlue

#008B8B:DarkCyan

#B8860B:DarkGoldenRod

#A9A9A9:DarkGray

#006400:DarkGreen

#BDB76B:DarkKhaki

#8B008B:DarkMagenta

#556B2F:DarkOliveGreen

#FF8C00:Darkorange

#9932CC:DarkOrchid

#8B0000:DarkRed

#E9967A:DarkSalmon

#8FBC8F:DarkSeaGreen

#483D8B:DarkSlateBlue

#2F4F4F:DarkSlateGray

#00CED1:DarkTurquoise

#9400D3:DarkViolet

#FF1493:DeepPink

#00BFFF:DeepSkyBlue

#696969:DimGray

#1E90FF:DodgerBlue

#D19275:Feldspar

#B22222:FireBrick

#FFFAF0:FloralWhite

#228B22:ForestGreen

#FF00FF:Fuchsia

#DCDCDC:Gainsboro

#F8F8FF:GhostWhite

#FFD700:Gold

#DAA520:GoldenRod

#808080:Gray

#008000:Green

#ADFF2F:GreenYellow

#F0FFF0:HoneyDew

#FF69B4:HotPink

#CD5C5C:IndianRed

#4B0082:Indigo

#FFFFF0:Ivory

#F0E68C:Khaki

#E6E6FA:Lavender

#FFF0F5:LavenderBlush

#7CFC00:LawnGreen

#FFFACD:LemonChiffon

#ADD8E6:LightBlue

#F08080:LightCoral

#E0FFFF:LightCyan

#FAFAD2:LightGoldenRodYellow

#D3D3D3:LightGrey

#90EE90:LightGreen

#FFB6C1:LightPink

#FFA07A:LightSalmon

#20B2AA:LightSeaGreen

#87CEFA:LightSkyBlue

#8470FF:LightSlateBlue

#778899:LightSlateGray

#B0C4DE:LightSteelBlue

#FFFFE0:LightYellow

#00FF00:Lime

#32CD32:LimeGreen

#FAF0E6:Linen

#FF00FF:Magenta

#800000:Maroon

#66CDAA:MediumAquaMarine

#0000CD:MediumBlue

#BA55D3:MediumOrchid

#9370D8:MediumPurple

#3CB371:MediumSeaGreen

#7B68EE:MediumSlateBlue

#00FA9A:MediumSpringGreen

#48D1CC:MediumTurquoise

#C71585:MediumVioletRed

#191970:MidnightBlue

#F5FFFA:MintCream

#FFE4E1:MistyRose

#FFE4B5:Moccasin

#FFDEAD:NavajoWhite

#000080:Navy

#FDF5E6:OldLace

#808000:Olive

#6B8E23:OliveDrab

#FFA500:Orange

#FF4500:OrangeRed

#DA70D6:Orchid

#EEE8AA:PaleGoldenRod

#98FB98:PaleGreen

#AFEEEE:PaleTurquoise

#D87093:PaleVioletRed

#FFEFD5:PapayaWhip

#FFDAB9:PeachPuff

#CD853F:Peru

#FFC0CB:Pink

#DDA0DD:Plum

#B0E0E6:PowderBlue

#800080:Purple

#FF0000:Red

#BC8F8F:RosyBrown

#4169E1:RoyalBlue

#8B4513:SaddleBrown

#FA8072:Salmon

#F4A460:SandyBrown

#2E8B57:SeaGreen

#FFF5EE:SeaShell

#A0522D:Sienna

#C0C0C0:Silver

#87CEEB:SkyBlue

#6A5ACD:SlateBlue

#708090:SlateGray

#FFFAFA:Snow

#00FF7F:SpringGreen

#4682B4:SteelBlue

#D2B48C:Tan

#008080:Teal

#D8BFD8:Thistle

#FF6347:Tomato

#40E0D0:Turquoise

#EE82EE:Violet

#D02090:VioletRed

#F5DEB3:Wheat

#FFFFFF:White

#F5F5F5:WhiteSmoke

#FFFF00:Yellow

#9ACD32:YellowGreen

About "HTML how to set background color and background image" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report