GeoffKnagge.com

Headings

This is probably the first text formatting that you'll use. The <H#> </H#> pair are generally used for headings, where # is the size 1-6. 1 is the largest, 6 the smallest. A new line is usually started after each </H#>, however this was avoided in the following output example by using a table.
Example use : <H2>Headings</H2> produced the above heading

Size 1

Size 2

Size 3

Size 4

Size 5
Size 6


Pre Formatted Text

<pre > (text here) </pre>
Displays a fixed width font, as seen here.
Any carraige returns (ie new lines) within the HTML document will force
new lines to be displayed.
Note: The following tags should not be used within a block of preformatted text : IMG, BIG, SMALL, SUB, SUP and FONT

Changing text direction

<BDO dir="???" lang="???"> </BDO>
This overrides the setting for the text direction. dir must be specified and is either RTL (right-to-left) or LTR (left to right). lang is the only other attribute available for this tag.

Special Characters

If you wish to display a character that is not on the keyboard, you can use &#?;, where ? is a decimal number, or a hexadecimal number with a H immediately following. The number represents the number value of the character within a character set.

There are also a few special & codes:
  • &lt; : displays the less than sign
  • &gt;: displays the greater than sign
  • &amp;: displays the & symbol
  • &shy;: soft hyphen - indicates where a line break is permitted.
  • &quot;: displays quotation marks (")

Character Formatting

NameTags usedDescription / Example
Blink <Blink> </Blink> produces text which blinks
Bold <B> </B>
<STRONG> </STRONG>
produces text like this
Italics <i> </i> or
<em> </em>
produces text like this
Subscript<sub> </sub> produces text in subscript form
Superscript<sup> </sup> produces text in superscript form

Paragraph Formatting

NameTags usedDescription / Example
Blockquote <blockquote cite="address of source"> </blockquote> Used for
quoting text. As you can see, it also indents!

Break <br> Linebreak : starts a new line. There is no closing tag.
INS and DEL <DEL>old text</DEL><INS>new text</INS>Used to mark document changes. The cite="address" attribute can be used to explain why changes occurred.
Paragraph <P Align="?"> </P> Forces a new paragraph. Alignment can be left, right or center.
No Breaks <nobr> </nobr> Disallows taking a new line if the text is too wide for the window
short quote <Q cite="address of source"> </Q> Used forshort quotes that don't need indenting
Word Break <wbr> For use within a NOBR section, this marks where a line break is allowed if needed, but it does not force one.


Miscellaneous

The following are a few extra tags that exist... most of them are duplicates of others or have little point...
NameTags usedDescription / Example
Abbreviation <abbr> </abbr> abbreviated text. It is intended that the title attribute be used to give the meaning.
Acronym <acronym> </aronym> eg. W3C, radar, etc. It is intended that the title attribute be used to give the meaning.
Address <address> </address>
intended for display of addresses

Big <big> </big> Displays text in a bigger size
Citation <cite> </cite> Basically QUOTE without the indenting
Code <code> </code> Intended for display of program code
Definition <dfn> </dfn> Represents a defining instance
Keyboard <kbd> </kbd> Represents text input from a keyboard
Sample<samp> </samp> Displays text in a fixed spaced font
Smaller size : <small> </small> Displays text in a smaller size
Teletype <tt> </tt> displays a fixed width font
Variables <var> </var> Used when displaying variable names
(C)opyright 2001-2008, Geoff Knagge.
Continued use of this site indicates your agreement to the Conditions of use and Privacy Policy.