In CSS, you can use the "font-size" and color attributes to set the font size and font color. You only need to add "{font-size: font size value; color: color value;}" to the font element. Just style it.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
How to set font size and font color in css:
1. Use the font-size attribute to set the font size
Demo code:
1 |
|
The example is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Output result:
2. Use the color attribute to set the font color
Demo code:
1 |
|
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Output result:
For more programming related knowledge, please Visit: Programming Video! !
The above is the detailed content of How to set font size and font color in css. For more information, please follow other related articles on the PHP Chinese website!