📄 html_formatting.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 Text Formatting</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 Text Formatting</h1>
<a href="html_attributes.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_entities.asp"><img border="0" src="../images/btn_next.gif" alt="Next" width="100" height="20" /></a>
<hr />
<p class="intro">HTML defines a lot of elements for formatting output, like bold or italic
text.</p>
<p class="intro">Below are a lot of examples that you can try out yourself:</p>
<hr />
<h2>Examples</h2>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_formattingch">Text formatting</a><br />
This example demonstrates how you can format text in an HTML document.
</p>
<p>
<a target="_blank" href="tryit.asp@filename=tryhtml_pre">Preformatted text</a><br />
This example demonstrates how you can control the line breaks and spaces with the
pre tag.
</p>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_computeroutput">"Computer output"
tags</a><br />
This example demonstrates how different "computer output" tags
will be displayed.
</p>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_address">Address</a><br />
This example demonstrates how to write an address in an HTML document.
</p>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_abbr">Abbreviations and acronyms</a><br />
This example demonstrates how to handle an abbreviation or an acronym.
</p>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_bdo">Text direction</a><br />
This example demonstrates how to change the text direction.
</p>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_q">Quotations</a><br />
This example demonstrates how to handle long and short quotations.</p>
<p><a target="_blank" href="tryit.asp@filename=tryhtml_del">Deleted and inserted text</a><br />
This example demonstrates how to mark a text that is deleted or inserted to a
document.
</p>
<hr />
<h2>How to View HTML Source</h2>
<p>Have you ever seen a Web page and wondered "Hey! How did they do that?"</p>
<p>To find out, click the VIEW option in your browser's toolbar and
select SOURCE or PAGE SOURCE. This will open a window that shows you the
HTML code of the page.</p>
<hr />
<h2>Text Formatting Tags</h2>
<table class="ex" cellspacing="0" border="1" width="100%">
<tr>
<th width="20%" align="left">Tag</th>
<th width="80%" align="left">Description</th>
</tr>
<tr>
<td><a href="../tags/tag_font_style.asp"><b></a></td>
<td>Defines bold text</td>
</tr>
<tr>
<td><a href="../tags/tag_font_style.asp"><big></a></td>
<td>Defines big text</td>
</tr>
<tr>
<td><a href="../tags/tag_phrase_elements.asp"><em></a></td>
<td>Defines emphasized text </td>
</tr>
<tr>
<td><a href="../tags/tag_font_style.asp"><i></a></td>
<td>Defines italic text</td>
</tr>
<tr>
<td><a href="../tags/tag_font_style.asp"><small></a></td>
<td>Defines small text</td>
</tr>
<tr>
<td><a href="../tags/tag_phrase_elements.asp"><strong></a></td>
<td>Defines strong text</td>
</tr>
<tr>
<td><a href="../tags/tag_sup.asp"><sub></a></td>
<td>Defines subscripted text</td>
</tr>
<tr>
<td><a href="../tags/tag_sup.asp"><sup></a></td>
<td>Defines superscripted text</td>
</tr>
<tr>
<td><a href="../tags/tag_ins.asp"><ins></a></td>
<td>Defines inserted text</td>
</tr>
<tr>
<td><a href="../tags/tag_del.asp"><del></a></td>
<td>Defines deleted text</td>
</tr>
<tr>
<td><a href="../tags/tag_strike.asp"><s></a></td>
<td class="deprecated">Deprecated. Use <del> instead</td>
</tr>
<tr>
<td><a href="../tags/tag_strike.asp"><strike></a></td>
<td class="deprecated">Deprecated. Use <del> instead</td>
</tr>
<tr>
<td><a href="../tags/tag_u.asp"><u></a></td>
<td class="deprecated">Deprecated. Use styles instead</td>
</tr>
</table>
<h2>"Computer Output" Tags</h2>
<table class="ex" cellspacing="0" border="1" width="100%">
<tr>
<th width="20%" align="left">Tag</th>
<th width="80%" align="left">Description</th>
</tr>
<tr>
<td><a href="../tags/tag_phrase_elements.asp"><code></a></td>
<td>Defines computer code text</td>
</tr>
<tr>
<td><a href="../tags/tag_phrase_elements.asp"><kbd></a></td>
<td>Defines keyboard text </td>
</tr>
<tr>
<td><a href="../tags/tag_phrase_elements.asp"><samp></a></td>
<td>Defines sample computer code</td>
</tr>
<tr>
<td><a href="../tags/tag_font_style.asp"><tt></a></td>
<td>Defines teletype text</td>
</tr>
<tr>
<td><a href="../tags/tag_phrase_elements.asp"><var></a></td>
<td>Defines a variable</td>
</tr>
<tr>
<td><a href="../tags/tag_pre.asp"><pre></a></td>
<td>Defines preformatted text</td>
</tr>
<tr>
<td><listing></td>
<td class="deprecated">Deprecated. Use <pre> instead </td>
</tr>
<tr>
<td><plaintext></td>
<td class="deprecated">Deprecated. Use <pre> instead</td>
</tr>
<tr>
<td><xmp></td>
<td class="deprecated">Deprecated. Use <pre> instead</td>
</tr>
</table>
<h2>Citations, Quotations, and Definition Tags</h2>
<table class="ex" cellspacing="0" border="1" width="100%">
<tr>
<th width="20%" align="left">Tag</th>
<th width="80%" align="left">Description</th>
</tr>
<tr>
<td><a href="../tags/tag_abbr.asp"><abbr></a></td>
<td>Defines an abbreviation</td>
</tr>
<tr>
<td><a href="../tags/tag_acronym.asp"><acronym></a></td>
<td>Defines an acronym</td>
</tr>
<tr>
<td><a href="../tags/tag_address.asp"><address></a></td>
<td>Defines an address element</td>
</tr>
<tr>
<td><a href="../tags/tag_bdo.asp"><bdo></a></td>
<td>Defines the text direction</td>
</tr>
<tr>
<td><a href="../tags/tag_blockquote.asp"><blockquote></a></td>
<td> Defines a long quotation</td>
</tr>
<tr>
<td><a href="../tags/tag_q.asp"><q></a></td>
<td>Defines a short quotation</td>
</tr>
<tr>
<td><a href="../tags/tag_phrase_elements.asp"><cite></a></td>
<td>Defines a citation</td>
</tr>
<tr>
<td><a href="../tags/tag_phrase_elements.asp"><dfn></a></td>
<td>Defines a definition term</td>
</tr>
</table>
<br />
<hr />
<a href="html_attributes.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_entities.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 + -