1. Text Layout 1.1 fonts
We can use CSS styles to set style attributes such as font, font size, color, and so on for text in a Web page. Let's take a look at an example where the following code is implemented: set the font for text in a Web page to Arial.
Body{font-family: "The song Body";}
Be careful not to set fonts that are not commonly used, because the default font is displayed if the font you set is not installed on the user's local computer. (because the user can see whether the font style you set depends on whether the font you set is installed on the user's local computer.) )
Now General page likes to set " Microsoft Ya Black", the following code:
body{font-family: "Microsoft Yahei";}
Or
Body{font-family: "Microsoft Jas Black";}
Note: The first method is better compatible than the second method.
Because this font is beautiful and can be displayed in the client security (the user is generally installed by default).
1.2 Font size, color
You can use the following code to set the font size of the text in the Web page to 12 pixels and set the color to #666 (gray):
Body{font-size:12px;color: #666;} or Body{font-size:12px;color:grey;}
1.3 Bold
We can also use CSS style to change the style of the text: bold, italic, underline, strikethrough, you can use the following code to implement the formatting text in bold style display.
P Span{font-weight:bold;}
As you can see here, if you want to set the bold font for text to be implemented with a separate CSS style, you don't have to use the H1-H6 or strong tags to implement bold styles.
CSS format layout