Design experience: Talk about the default font for the Web

Source: Internet
Author: User

1. The priority description is not rigorous, when there is!important, the page style can override the user-defined style. User!important > Web!important > User > Page > Browser default.

2. Tahoma font from Win95, and starting from Win2000, Tahoma become the default font for Win English system. The built-in Tahoma fonts are also started in Mac OS X v10.5 (Leopard) in 2007. So far, the popularity is still quite good.

3. Google, YAHOO and other sites, the preferred Arial, personally feel that the compatibility considerations. Google needs to take into account the support of a variety of devices, and Google's home page continues to use the table layout, the table layout can be guaranteed in as many user terminals to display correctly. Arial font is the same.

4. But this does not mean that Google and other pages of the practice is the best. From the perspective of progressive enhancement, Font-family:tahoma, Helvetica, Arial, Sans-serif; Can achieve the goal of graceful demotion. In a better user agent, the display of better fonts, along with Arial rear, can also be guaranteed to be displayed correctly in as many terminal terminals as possible. The gradual enhancement is everywhere, needs our common effort and the promotion. (Note: Consider the MAC user, Leopard built-in Tahoma font, so Font-family:helvetica, Tahoma, Arial, Sans-serif; will be more gradual to enhance some)

5. Omitting the default font family is not recommended. This is the same as omitting </body>, 99.99% of the case will not cause problems, and is an optimization method. But in addition to special pages (such as Google home), ordinary page ordinary traffic, save this bit of characters, not conducive to the overall progress of the WEB standards.

6. Do not set the song body, in the GBK encoding, the English operating system, IE's default font is Microsoft Sans Serif Regular. (Note: You can avoid this problem without setting the Sans-serif, but consider the 5th above, and still recommend "XXFarEastFont-Arial" to solve the problem)

7. According to usability guru Jackob Nielsen, sans serif fonts are easier to read than serif fonts at the current computer monitor's dpi. User research shows that Verdana fonts are the most readable, and the recommended setting is the first default font. This, you can refer to the font settings of ALA, it is really comfortable to read.

8. The problem with Tahoma fonts is that italic, especially when small, text is not easy to read, there is the wheat summed up the problem. The problem with Verdana fonts is that the font size is larger than other fonts, which results in poor blending. Consider the Chinese web page, generally very little italic, so Tahoma is still the first choice.

9. Regarding the default row height, for the blog and so on the big paragraph text application, 1.5 is a very good choice. But for most of Taobao's pages, 1.5 will lead to Li, HX, Div and other elements of the default row height is 1.5, which will bring a lot of actual work to reset the workload and some Strange bugs (Tiger & have feet, quickly summed up OH). I am more inclined to body {line-height:1} p {line-height:1.5;}

10. The effect of font on performance and efficiency can be neglected. Sometimes, do not be good at small. In 97% of cases, immature optimization is the root of all evils.

11. Future: Several years later, as the display DPI improves, the default font of the Web page is likely to be the same as the recommended font for the traditional printing industry-with a serif font. I'll talk about it later.

Finally, my recommendation is:

Body {FONT:12PX/1 Helvetica, Tahoma, Arial, \5b8b\4f53, Sans-serif;}
p {line-height:1.5;}

Welcome to the discussion.



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.