⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 html_fonts.asp@output=print

📁 W3Schools tutorial..web designing
💻 ASP@OUTPUT=PRINT
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>HTML Fonts</title>
 
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />

<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</head>
<body>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>


<h1>HTML Fonts</h1>
<a href="html_layout.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_whyusehtml4.asp"><img border="0" src="../images/btn_next.gif" alt="Next" width="100" height="20" /></a>
<hr />

<p class="intro">The &lt;font&gt; tag in HTML is deprecated. It is supposed to
be removed in a future version of HTML.</p>

<p class="intro">Even if a lot of people are using it, you should try to avoid
it, and use styles instead.</p>

<hr />

<h2>The HTML &lt;font&gt; Tag</h2>

<p>With HTML code like this, you can specify both the size and the type of the
browser output :</p>
<table border="1" width="100%" class="ex" cellspacing="0">
  <tr>
    <td>
      <pre>&lt;p&gt;
&lt;font size=&quot;2&quot; face=&quot;Verdana&quot;&gt;
This is a paragraph.
&lt;/font&gt;
&lt;/p&gt;</pre>
      <pre>&lt;p&gt;
&lt;font size=&quot;3&quot; face=&quot;Times&quot;&gt;
This is another paragraph.
&lt;/font&gt;
&lt;/p&gt;</pre>
    </td>
  </tr>
</table>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_font">Try it yourself</a></p>

<h2>Font Attributes</h2>
<table class="ex" cellspacing="0" border="1" width="100%">
<tr>
<th align="left">Attribute</th>
<th align="left">Example</th>
<th align="left">Purpose</th>
</tr>
<tr>
<td>size=&quot;number&quot;</td>
<td>size=&quot;2&quot;</td>
<td>Defines the font size</td>
</tr>
<tr>
<td>size=&quot;+number&quot;</td>
<td>size=&quot;+1&quot;</td>
<td>Increases the font size</td>
</tr>
<tr>
<td>size=&quot;-number&quot;</td>
<td>size=&quot;-1&quot;</td>
<td>Decreases the font size</td>
</tr>
<tr>
<td>face=&quot;face-name&quot;</td>
<td>face=&quot;Times&quot;</td>
<td>Defines the font-name</td>
</tr>
<tr>
<td>color=&quot;color-value&quot;</td>
<td>color=&quot;#eeff00&quot;</td>
<td>Defines the font color</td>
</tr>
<tr>
<td>color=&quot;color-name&quot;</td>
<td>color=&quot;red&quot;</td>
<td>Defines the font color</td>
</tr>
</table>
<br />

<hr />

<h2>The &lt;font&gt; Tag Should NOT be Used</h2>

<p>The &lt;font&gt; tag is deprecated in the latest versions of HTML (HTML 4 and
XHTML).</p>

<p>The World Wide Web Consortium (W3C) has removed the &lt;font&gt; tag from its
recommendations. In future versions of HTML, style sheets (CSS) will be used to
define the layout and display properties of HTML elements.&nbsp;</p>

<hr />

<h2>The Right Way to Do It - With Styles</h2>

<p><a target="_blank" href="tryit.asp@filename=tryhtml_font-family">Set the font of text</a><br />
This example demonstrates how to set the font of a text.</p>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_font-size">Set the font size of text</a><br />
This example demonstrates how to set the font size of a text.</p>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_color">Set the font color of text</a><br />
This example demonstrates how to set the color of a text.</p>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_fontall">Set the font, font size, and 
font color of text</a><br />
This example demonstrates how to set the font, font size, and font color of a text.</p>
<hr />
<h2>Where to Learn More About Style Sheets?</h2>
<p><b>First off:</b> Finish the last chapters in our HTML tutorial !!! In the
following chapters we will explain why some tags, like &lt;font&gt;, are to be
removed from the HTML recommendations, and how to insert a style sheet in an
HTML document.</p>
<p>To learn more about style sheets: Study our <a href="../css/default.asp">CSS Tutorial</a>.</p>
<hr />
<a href="html_layout.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_whyusehtml4.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -