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

📄 html_entities.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 Entities</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 Character Entities</h1>
<a href="html_formatting.asp"><img border="0" src="../images/btn_previous.gif" alt="Previous" width="100" height="20" /></a>
<a href="html_links.asp"><img border="0" src="../images/btn_next.gif" alt="Next" width="100" height="20" /></a>

<hr />
<p class="intro">Some characters like the &lt; character, have a special meaning in HTML, and therefore
cannot be used in the text.</p>
<p class="intro">To display a less than sign (&lt;) in HTML, we have to use a
character entity.</p>
<hr />
<h2>Character Entities</h2>
<p>Some characters have a special meaning in HTML, like the less than sign (&lt;)
that defines the start of an HTML tag. If we want the browser to actually display
these characters we must insert character entities in the HTML
source.</p>
<p>A character entity has three parts: an ampersand (&amp;), an entity name or a
# and an entity number, and finally a semicolon (;).
</p>

<p>To display a less than sign in an HTML document we must write: <b>&amp;lt;</b>
or <b>&amp;#60;</b>
</p>

<p>The advantage of using a name instead of a number is that a name is easier to remember. The disadvantage is that not all browsers support the
newest entity names, while the support for entity numbers is very
good in almost all browsers.</p>

<p><b>Note</b> that the entities are case sensitive.&nbsp;</p>

<p>This example lets you experiment with character entities:
<a target="_blank" href="tryit.asp@filename=tryhtml_entities">Character Entities</a></p>

<hr />

<h2>Non-breaking Space</h2>
<p>The most common character entity in HTML is the non-breaking space.</p>
<p>Normally HTML will truncate spaces in your text. If you write 10 spaces in
your text HTML will remove 9 of them. To add spaces to your text, use the &amp;nbsp;
character entity.</p>
<hr />

<h2>The Most Common Character Entities:</h2>

<table class="ex" cellspacing="0" border="1" width="100%">
    <tr>
      <th align="left">Result</th>
      <th align="left">Description</th>
      <th align="left">Entity Name</th>
      <th align="left">Entity Number</th>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>non-breaking space</td>
      <td>&amp;nbsp;</td>
      <td>&amp;#160;</td>
    </tr>
    <tr>
      <td>&#60;</td>
      <td>less than</td>
      <td>&amp;lt;</td>
      <td>&amp;#60;</td>
    </tr>
    <tr>
      <td>&gt;</td>
      <td>greater than</td>
      <td>&amp;gt;</td>
      <td>&amp;#62;</td>
    </tr>
    <tr>
      <td>&amp;</td>
      <td>ampersand</td>
      <td>&amp;amp;</td>
      <td>&amp;#38;</td>
    </tr>
    <tr>
      <td>&quot;</td>
      <td>quotation mark</td>
      <td>&amp;quot;</td>
      <td>&amp;#34;</td>
    </tr>
    <tr>
      <td>'</td>
      <td>apostrophe&nbsp;</td>
      <td>&amp;apos; (does not work in IE)</td>
      <td>&amp;#39;</td>
    </tr>
</table>

<h2>Some Other Commonly Used Character Entities:</h2>

<table class="ex" cellspacing="0" border="1" width="100%">
    <tr>
      <th align="left">Result</th>
      <th align="left">Description</th>
      <th align="left">Entity Name</th>
      <th align="left">Entity Number</th>
    </tr>
    <tr>
      <td>

⌨️ 快捷键说明

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