About the font setting and font setting of webpages

Source: Internet
Author: User

About the font setting and font setting of webpages

Setting the font of the entire site has always been a simple but not simple task, because it involves too many things.

This article describes how to select a font for an ordinary Website Based on your needs. 1. required knowledgeFirst, we should make it clear that this font is not set for you, and the user's computer will display it in this font. If this font is not installed on your computer, it will be rendered in the second font you set. See a common setting
Font-family: tahoma, arial, 'hiragino Sans gb', \ 5b8b \ 4f53, sans-serif;/* Where \ 5b8b \ 4f53 indicates, this Unicode encoding can be compatible with all browsers */
If the above Code is set on a machine without the tahoma font, the machine will be rendered in arial font. If not, use the latter one. If you do not specify any font, a font in the sans-serif family will be used. Then, let's talk about what sans-serif is. Sans-serif is not a font, but a class font. Accordingly, serif is the meaning of serif font. (Explanation: The linefeed is a small Modifier on the font. It can be Baidu. It has little to do with this article and won't be discussed .) For common font families, sort out the following:
  • Serif: Specifies the serif font. Times New Roman is the default serif font. If it is a Chinese font, It is a font such as and.
  • Sans serif: silent font. Arial is the default sans-serif font. Among Chinese fonts, and are all such fonts. The English fonts include Helvetica, Geneva, and Verdana.
  • Monospace: Equal-width font. Each letter in the font has the same width. It is usually used to display program code. Courier is the default monospace font. For Chinese, each Chinese character is of the same width.
2. How to set the font?After reading the necessary knowledge above, I must have a slightly systematic understanding of the font. So how do I set the website font? Some people use, arail, or tahoma as the first font. However, there is a big problem here. For fonts with a larger font size (over 16 Px), rendering is quite ugly. However, if I use the font optimized in windows on my computer, I cannot display it to anyone. In short, this setting is ugly for Large fonts. Some people say that is pretty nice when the font is big. How about setting all the settings for? There is a big problem here. is only available in windows vista. For xp users with a share of more than 65%, you set to not write. They still use or something for rendering. In addition to your self-comfort or dealing with BOSS (BOSS will usually catch up with the trend with windows 7 or above ). It is really useless for most users. In addition, doesn't get better when rendering 12 PX fonts. Therefore, I think we should set the font according to the actual business situation. 3. ConclusionAfter the above analysis, I have summarized a setting method that I think is quite good. 1. The overall optimal full-site font setting is as follows:
font-family:Helvetica,arial,'Hiragino Sans GB',\5b8b\4f53,sans-serif;
Then, you can use images to process Large fonts (such as navigation. Because after using images, you don't need to worry about whether the user has installed the font. In addition, you can make more beautiful and more scalable. 2: The best performance is the full-site font or
font-family:Helvetica,arial,'Hiragino Sans GB',\5b8b\4f53,sans-serif;
And then for the large font (here it does not matter ). Set separately
font-family:Microsoft YaHei;
This setting saves the front end a lot of trouble, but many xp users will be ugly by the large font. 3: the most convenient solution is direct
font-family:Helvetica,arial,'Hiragino Sans GB',\5b8b\4f53,sans-serif;
Or
font-family:Microsoft YaHei,Helvetica,arial,'Hiragino Sans GB',\5b8b\4f53,sans-serif;
Although it is possible that the large font is not beautiful, although the small font of the rendering is not clear. But, what is the relationship. Finally, this article is about common Chinese websites. If you want to consider English and various systems. So there are more things to study here.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.