Font setting
Hello everyone, the web design thinking column continues today. We last discussed the layout of the homepage design and color matching, today we will talk about the font.
● The font (font) is the first difficult point encountered by the pages. How to control the font size, how to cancel the ultra-linked font is the most information on netizens. Ok, let's completely study all aspects of the font:
Setting of character sets.
When viewing the original code of the HTML file, we can often see this code between the file header:
What is the role of this code? Can you delete it?
In fact, this is the setting statement of the Meta label, which is to see the browser. Its role is to tell the browser: This HTML file is made from GB2312 character set. When the browser reads this code, use the GB2312 character set to explain and translate the web original code, and then we can see the correct webpage. So this META statement is very important, try not to delete.
GB2312 is our most familiar GB Simplified Code, English is an ISO-8859-1 character set. The other character sets such as BIG5, UTF-8, Shift-JIS, EUC, KOI8-2 are used for different font display, respectively.
The use of fonts.
In the web page, the definition statement of the font is:
Text
Among them, Arial is a name of a font.
The default browser defined standard font is Chinese Song and English Times New Roma font. That is, if you don't set any fonts, the web page will be displayed in these two standard fonts. At the same time, two fonts can also be displayed correctly in any operating system and browser.
Windows has another 40 kinds of English fonts and 5 Chinese fonts. These fonts, you can also use and set up in the web page. All browsers using the Windows operating system can display these fonts correctly, but in other operating systems, such as Unix cannot be fully displayed.
If you need to use a special font to reflect your style, how do you let everyone really see your design page? The solution is: use pictures.
It is necessary to use this font to replace it with a picture to ensure that the page seen by everyone is the same effect.
Style of the font.
The font's style has four types: regular, ITALIC, bold, bold italic. The setting method is simple, and Abie is not more than Luo.
The effect of the font.
Here, it refers to the effect that can be displayed directly through the HTML language setting, and the statement in HTML is set to:
Among them, OVERLINE refers to the overline effect. Other common effects include: underline, Uppercase (capital), etc.
Font size control.
The control of the font size is the focus of this section.
The default size of the general font is 12pt (pound). Use the statement to increase the text by 2PT. We have already mastered this method. And now how the most popular small Chinese font size is 9pt, how is it? Three ways:
1. Use the "display text" statement to set.
Obviously this method is very troublesome, you have to set the size for each text.
2. Stack the style sheet with a CSS. CSS is a component of DHTML that defines the font display style and size of the entire page. It is a simple method. For example, here you need to set the entire page text size of 9pt, just add the following code to the HTML code and between:
Where font-size: 9pt refers to the size of 9 pounds
3. The second method has simplified many steps, but it is still not the ideal way, because you must place such a code in the HEAD area of each page, expand the byte of the file. In addition, this kind of practice has a major disadvantage, that is, if I need to modify the font size of the entire site, I must change one page!
So it is recommended to ultimately the best way to currently - the external touch board file call. "External touch board call" means that you make CSS's settings into a separate file, call it in each page. Once you need to modify the font size, just modify a .css file, hundreds of pages are also modified. (This method is easy to understand the netizens, similar to the programming process :)
The specific method of call is as follows:
(1) Cry the above CSS code COPY into a mycss.txt file, then modify the compixer name to mycss.css
(2) Insert between the HTML file,
The statement calls mycss.css (note the settings of the path) OK!
Font hyperlink style settings.
Usually set the colors of the connection in the web page, such as:
Where: LINK - HyperLink color
VLINK - Visited HyperLink (Accessible Connection) Color
ALINK - Active HyperLink (Current Active Connection) Color
The color of the color RGB is indicated by red, such as red is # ff0000.
Similarly, CSS can set the page super connection style, look at the following
It is possible to insert it into the HTML file. Where the LINK is set to have a color of the hyperlink; Visited is the accessed hyperlink color; Active is the color of the mouse moves; Hover is the color of the mouse click. "Text-Decoration: none" means the underscore display of the hyperlink.
About CSS settings There are more usage and techniques, such as setting different font size and hyperlink colors in the same page, learn about CSS's expertise (can go to Abie's home http: // pageone. Yeah.Net Review) We are not scored here.
● The above has been introduced in terms of technical various aspects. There is no mature theory in the design of the font. The following is the principle of fonts in several web designs, for reference only:
1. Do not use more than 3 or more fonts. There is too much font, there is no subject.
2. Don't use too much words. Because the layout is precious, limited, rough big fonts cannot bring more information to visitors.
3. Do not use non-splashing text. If you want the viewer to stay more for a while, don't use the flashing text.
4. In principle, the fonts of the title are large, and the color should also be different.
● Attached: English font resources
Http://www.pambytes.com
http://www.freeestuff101.com/fonts
http://www.typearound.com/mainfont.html
http://205.177.231.33/sofontes/us/pc_us.htm
Regarding the font, I will write here today, you have a good suggestion or opinion, please let us know Ajie@soim.com. Next chapter we continue to discuss the design of the form.