Today we talk about fonts.
● font (Font) the setting is new to web making the first difficult encounter. How to control the font size, font underline how the abolition of the link is a letter from users most frequently ask. Well, we have to thoroughly examine all aspects of the font:
○ character set settings.
View html file in the source code, we can often headers
The role of this code is it? Can I delete it?
In fact, this is a meta tag to set statement is read to the browser. Its role is to tell the browser: This HTML document was produced by gb2312 character set. When the browser read the code, then the gb2312 character set to interpret and translate web pages of the original code, then we can see the correct page. Therefore, this meta statement is very important, try not to delete.
gb2312 that we are most familiar with GB code simplified, English is the iso-8859-1 character set. Others have BIG5, UTF-8, Shift-JIS, EUC, KOI8-2 and other character sets, each for a different type.
○ font to use.
The page, the font definition statement is: display text font> which Arial is a font name.
The default browser font is the standard definition of the Chinese and English times new Roma Times New Roman font. That is, if you do not set any fonts, page will display two standard fonts. Meanwhile, the two fonts in any operating system and browser display correctly.
windows also comes with more than 40 kinds of English fonts and five kinds of Chinese fonts. These fonts, the page where you can freely use and settings. Those who use the windows operating system the browser can display these fonts correctly, but in other operating systems, as seen in unix you can not display correctly.
If you need a special font to reflect your style, then how we can really see your design in the front? The solution is: use the picture.
Will need to use this font with pictures instead of the place, to ensure that all see the same results page.
○ font style (style).
There are four font styles: normal weight (regular), Italic (Italic), bold (Bold), Bold Italic (Bold Italic). Set is simple, A is not more wordy the Czech Republic.
○ font effect.
Html language here refers to the effect settings can be displayed directly in the html in the statement is set to:
display text span>
Which, overline refers to the effect on the dash. Other common effects are: underline (underscore), uppercase (capital) and so on.
○ font size control.
Font-size control is the focus of this section.
The default font size is normal 12pt (pounds). statement with the text can be increased 2pt. This method we have already mastered. Now the network's most popular size for small Chinese characters 9pt, is how to set it? There are three ways:
1. With " display text span>" statement to set.
Obviously this method is very troublesome, you must have set the size of each piece of text.
2. Using CSS Cascading Style Sheets. CSS is an integral part of DHTML, it can define the entire page font style and size. Is a more convenient way. For example, there need to set the entire page text size 9pt, as long as this code by adding the following html code and head> between: