Text layout - font

Text layout - font

We can use css styles set the font, size, color, style and other text attributes to the page. Let's look at an example, the following code implements: set the font to Times New Roman text pages.

body {font-family: "Times New Roman";}

Be careful not to set up here is not commonly used fonts, because if the user's local computer if you set the font is not installed, the browser will display the default font. (Because the user can see whether the font style you set depends on whether you set the fonts installed on the user's local computer.)
Now generally prefer to set the page, "Microsoft elegant black", the following code:

body{font-family:"Microsoft Yahei";}

or

body {font-family: "Microsoft yahei";}

Note: The first method is better than the second method a number of compatibility.

Because this font that is beautiful and can be displayed (local users are generally installed by default) in the Client Security.

Example:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>认识html标签</title>
<style type="text/css">
body{font-family:"幼圆";}

</style>
</head>
<body>
    <h1>>h1</Courage
    < The p- > third grade, I was a < span the above mentioned id = "Stress" > timid as a mouse </ span > little girl in class never dared to answer questions posed by the teacher, for fear the wrong answer teacher will criticize me. He has not the courage to answer the questions posed by the teacher. Activities organized by the school I have not the courage to participate. </ The p- > 
    < the p- > when the third grade to the next semester, our class of an open class, the teacher asked a very simple question, many students in the class raised their hands, and even worse grades than I, but also show of hands, but also said: "I come, I come." I looked around, I did not raise it. </ P > 
</ body > 
</ HTML >

Browser output:

courage

Third grade, I was a timid as a little girl mouse, school has never been afraid to answer questions posed by the teacher, for fear the wrong answer teacher will criticize me. He has not the courage to answer the questions posed by the teacher. Activities organized by the school I have not the courage to participate.

When the third grade next semester, our class of an open class, the teacher asked a very simple question, many students in the class raised their hands, and even worse grades than I, but also a show of hands, but also saying : "I come, I come." I looked around, I did not raise it.

Guess you like

Origin www.cnblogs.com/iBoundary/p/11432278.html