fbe University of New South Wales Sydney Australia UNSW
Faculty of the Built Environment search
HTML Reference
Character Formatting

The tags listed below can be used to change the appearance of a single character, a word, or a larger segment of text.
Logical Styles
Name Syntax Example
Strong <strong>text</strong> text
Emphasis <em>text</em> text
Cite <cite>text</cite> text
Keyboard <kbd>text</kbd> text
Fixed Width <samp>text</samp> text
Code <code>text</code> text
Physical Styles
Name Syntax Example
Bold <b>text</b> text
Italic <i>text</i> text
Typewriter <tt>text</tt> text
Superscript text<sup>text</sup> texttext
Subscript text<sub>text</sub> texttext
These basic formatting tags can be nested, for example:
Bold & Italic <b><i>text</i></b> text
Font
Netscape freed-up character formatting options with the introduction of a font tag, with the size and color attributes. Microsoft subsequently added the face attribute.

Attribute Notes Example
Font Size Valid sizes are 1 to 7, the default size is 3. The tag can be used on individual characters, words or paragraphs. This tag is sometimes used instead of the Heading paragraph types, because it allows better control the space before and after their heading. <font size=5>
Font Colour The colour can either be a "name" (as in the example) or can be a hexadecimal number. Refer to Body-Colour for further details on how to define colour. <font color=white>
Font Face The face attribute allows the font to be specified. If the first font listed is not found then the each subsequent font that is listed is "tested" and used if it's available. <font face="Arial, Helvetica">
Special Characters
A number of special strings have been defined to get characters that are not standard on all computer character sets (or that have different ASCII codes). Included below are some of the more commonly used symbols. There are also a large number of accents which are useful for some European languages.
Commonly Used Special Characters ["iso8859-1 table"]
Name Syntax Example
Ampersand &amp; &
Less Than &lt; <
Greater Than &gt; >
Double Quote &quot; "
Copyright &copy; ©
Registered &#174; ®
Superscript 0 &#176; °
Superscript 1 &#185; ¹
Superscript 2 &#178; ²
Superscript 3 &#179; ³
plus/minus &#177; ±
one quarter &#188; ¼
one half &#189; ½
three quarters &#190; ¾
divide &#247; ÷


Go to next section: Paragraph Formatting or return to the Contents page.

Last Updated: 06 November 1998