Introduction to HTML
Text Functions
Copyright © 1996 - 2002 Randy D. Ralph.  All rights reserved.
  Lines & Dividers Font Functions   Course Contents  

In place May 18, 1996.   Last updated May 26, 2000.

Content: Text Functions Special Characters

The table below provides a synopsis of HTML text formatting commands and functions: 

Type Form Action Example
Address <address>
</address>
The enclosed address is displayed in italics.  WWW search engines may index enclosed text as email addresses. This is an address <address>
rdralph@netstrider.com
</address>

This is an address

rdralph@netstrider.com
Notes: Use when creating mailto links on HTML pages.  This code alerts HTML that the enclosed text is an address. 
Blink <blink>
</blink>
The enclosed text is displayed as blinking.  This word is <blink>blinking</blink>.

This word is blinking

Notes: Use wherever blinking text is necessary or desirable.  Especially useful for drawing attention to links.  Most Internet users find blinking text annoying. 
Blockquote <blockquote>
</blockquote>
The enclosed text block is displayed in italics with left and right margins indented.  <blockquote>This is a block of quoted text.</blockquote>

This is a block of quoted text.
Notes: Use when a block quote style is necessary or desirable.  The entire block will have left and right margins indented in the section. 
Bold
Strong
<b></b>
<strong>
</strong>
The enclosed text is displayed bolded.  These words are <b>displayed in bold</b>.

These words are displayed in bold

Notes: Use wherever bold text is necessary or desirable.  Especially useful for emphasizing text.  The <b></b> form of the command may become obsolete. 
Center <center>
</center>
Displays enclosed text (and any embedded objects) centered on the page within the section.  <center>These words are centered.</center>

These words are centered.
Notes: Use wherever centered text is necessary or required.  This tag pair can also be used to center objects or tables.  This command forces a break. 
Italics
Cite
Emphasis
<i></i>
<cite>
</cite>
<em></em>
The enclosed text is displayed in italics.  These words are <i>in italics</i>.

These words are in italics

Notes: Use wherever italics are required or desirable.  Useful for emphasizing text.  Necessary in bibliographies and some citations.  The <i></i> form of the command may become obsolete. 
Code
Keyboard
Sample
Teletype
<code>
</code>
<kdb></kbd>
<sample>
</sample>
<tt></tt>
The enclosed text is displayed in a non-proportionally spaced font, usually Courier or Courier New.  These words are displayed <code>in non-proportional text</code>.

These words are displayed in non-proportional text

Notes: Use wherever non-proportionally spaced text is necessary or desirable.  Especially useful in indicating computer code or computer commands. 
Preformatted
Text
<pre width=>
</pre>
The text enclosed within the preformatted tags is displayed exactly as it appears on the screen of the editor in which it was generated.  All spaces and blank lines will be preserved as is.  The text will be displayed in a non-proportionally spaced font, usually Courier.  The optional width parameter specifies the width of the preformatted text column in characters. 
<pre width=20>This     is



        preformatted



            text.  </pre>
This     is



        preformatted



            text.
Notes: Use preformatted text tags whenever you want the actual formatting of the text preserved.  This is particularly useful for text-based tables, bibliographies and indented outlines and lists which HTML cannot effectively handle yet. 
Strikeout <s></s> The enclosed text is displayed as striken out.  These words are displayed <s>stricken out</s>.

These words are displayed stricken out

Notes: Use wherever stricken text is necessary or desirable.  This code extension is not widely accepted or implemented yet. 
Subscript
Superscript
<sub></sub>
<sup></sup>
The enclosed text is displayed as a subscript or a superscript.  CO<sub>2</sub> and 1 X 10<sup>6</sup>.

CO2 and 1 X 106

Notes: Use wherever subscripted text (C6H12O6) or superscripted text (E=mc2) is necessary.  These tags alter text alignment slightly by introducing more space between lines. 
Underline <u></u> The enclosed text is displayed as underlined.  This word is displayed <u>underlined</u>.

This word is displayed underlined

Notes: Use wherever text underlining is necessary or desirable.  This code extension is not widely accepted or implemented yet. 
Type Form Action Example

Content: Text Functions Special Characters

  Lines & Dividers Font Functions   Course Contents  
You are here:  NetStrider   »   Tutorials   »   HTML   »   TEXT   «