HTML basis of color

Color representation

HTML color is defined by a hexadecimal notation, the symbol of the red, green and blue values of the composition (RGB).
The minimum value of each color is 0 (hex: # 00). The maximum value is 255 (hex: #FF).
All current browsers support color names are defined. Comprising (17 standard colors, plus 124) 141 color names are in HTML and CSS color specifications defined.
With color name sort to see.

The sample code

<!DOCTYPE html>
<html>
<body>

<p style="background-color:#FFFF00">
通过十六进制设置背景颜色
</p>

<p style="background-color:rgb(255,255,0)">
通过 rgb 值设置背景颜色
</p>

<p style="background-color:yellow">
通过颜色名设置背景颜色
</p>

</body>
</html>
Published 25 original articles · won praise 19 · views 675

Guess you like

Origin blog.csdn.net/devin_xin/article/details/105013402