6.1 Formatting of text
① Text formatting tags
Label |
Describe |
<b> |
Defines bold text. |
<big> |
Defines a large word. |
<em> |
Defines the emphasis on text. |
<i> |
defines italic words. |
<small> |
Define small words. |
<strong> |
Define the aggravating tone. |
<sub> |
Defines the subscript word. |
<sup> |
Defines the superscript word. |
<ins> |
Defines the insertion word. |
<del> |
Defines the deletion word. |
<s> |
Do not approve of use. Use <del> instead. |
<strike> |
Do not approve of use. Use <del> instead. |
<u> |
Do not approve of use. Use style instead. |
② instances:
<b>this text is bold</b>
<strong>this text is strong</strong>
<big>this text is big</big>
<em>this text is emphasized</em>
<i>this text is italic</i>
<small>this text is small</small>
<sub>subscript</sub>
<sup>superscript</sup>
6.2 Pre-formatted text
① uses the pre tag to control blank lines and spaces.
② instances:
Code:
Results:
6.3 "Computer Output" tab
① "Computer Output" tab
Label |
Describe |
<code> |
Defines the computer code. |
<kbd> |
Defines the keyboard code. |
<samp> |
Define a sample of computer code. |
<tt> |
Define the typewriter code. |
<var> |
Defines a variable. |
<pre> |
Defines the pre-formatted text. |
<listing> |
Do not approve of use. Use <pre> instead. |
<plaintext> |
Do not approve of use. Use <pre> instead. |
<xmp> |
Do not approve of use. Use <pre> instead. |
② This example demonstrates the display of different computer output labels.
<code>computer code</code>
<kbd>keyboard input</kbd>
<tt>teletype text</tt>
<samp>sample text</samp>
<var>computer variable</var>
6.4 Address
① Label
Label |
Describe |
<address> |
Define the address. |
② This example demonstrates how to write an address in an HTML file.
<address>
Written by <a href= "Mailto:[email protected]" >donald duck</a>.<br>
Visit US at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>
Results:
③html <address> elements define the contact information (author/owner) of the document or article.
④ This element is typically displayed in italics. Most browsers add lines before or after this element.
6.5 Abbreviations and acronyms
① Label
Label |
Describe |
<abbr> |
Define abbreviations. |
<acronym> |
Defines the initials. |
② This example shows how to implement abbreviations or acronyms.
<abbr title= "Etcetera" >etc.</abbr>
<acronym title= "World Wide Web" >WWW</acronym>
Results:
② in some browsers, the title can be used to show the full version of the expression when you move the mouse over the thumbnail word.
③ is only valid for acronym elements in IE 5.
The ④<p> is valid for ABBR and acronym elements in Netscape 6.2. </p>
6.6 Text Direction
① Label
Label |
Describe |
<bdo> |
Defines the text direction. |
② This example shows how to change the direction of text.
<bdo dir= "RTL" >
Here is some Hebrew text
</bdo>
Results: Text Hebrew emos si Ereh
6.7 Block references
① references, references
Label |
Describe |
<blockquote> |
Defines a long reference. |
<q> |
Defines a short reference language. |
<cite> |
Define references, citations. |
② the blockquote element is used, the browser inserts line breaks and margins, and the Q element does not have any special rendering.
6.8 Terminology Definitions
① Term definition Label
Label |
Describe |
<dfn> |
Define a definition project. |
②html <dfn> elements define the definition of a project or abbreviation.
6.9 Delete Word effect and insert word effect
This example shows how to mark the deletion of text and insert text.
<p> a dozen <del> 20 </del> <ins> 12 </ins> pieces. </p>
Results:
6.10 HTML <cite> for titles of works
HTML <cite> elements define the title of the book.
Browsers typically display <cite> elements in italics.
HTML Learning Document-6, HTML text formatting