Five ways to color in 1.HTML
1) directly in the color of the English name expression
For example, the background color is white;
2. by 16 decimal notation
For example, the background color is black
3). By means of RGB
RGB: Is the first letter of the English alphabet in Red (red) green (blue) Three colors, with a value range of 0-255, with three parameter values
Indicates that the background color is yellow
Detailed values are shown in Figure 1
4). Expressed as a percentage
Three values are based on a percentage value of 255, and the effect is equal to Method 3
For example: Background-color:rgb (29%,50%,67%);
5). Use the Rgba () method to indicate
Writing methods and Methods 3, Method 4 is the same, the difference is that a is the color of the transparency, the value range is 0-1, 0 is completely transparent, 1 means completely opaque
For example: Background-color:rgba (211,213,12,0.4);
A simple overview of the writing specifications of 2.HTML
(1). All tag attributes must be written in English half-width and lowercase, otherwise the browser will not recognize
(2). Id,class name must begin with a letter, not with numbers and other symbols;
(3). All labels must be closed
Double label:
Single label: <br/>
shorthand for colors in HTML