This page is intended to demonstrate the use of several basic tags and character entities in XHTML. It shows the use of the <h2> tag, the <code> tag, the <p> tag, the <sup> tag, the <sub> tag and others. It also shows the use of character entities, such as &pi;, &nbsp;, &pound;, &euro; and &amp;, to name a few.

While the use of CSS was not required I did make use of inline style attributes to maintain a consistent and pleasing look, while maintaining the proper use of XHTML; which, for instance, would not have allowed the use of <h2> tags around ordered or unordered lists.

Area of a Circle

To write the formula to create the area of a circle, one has to use <sup> (superscript) and <i> (italic) tags. It is wrapped in <h2> tags to make it bold, and larger than this paragraph. Note: be careful with proper nesting to ensure that the page passes the XHTML validator.

A = πr2

Currency Conversion (use of special characters)

To use special symbols such as currency symbols in HTML, one could search through character map and find the symbols to insert in the document directly, if the encoding format supports it. But it's more appropriate to use entities, such as &pound;, &euro; and &yen;

$1.00CDN = $0.92US = £0.56 = €0.68 = ¥96.91

Code Snippet

To insert code into a website, one needs to use &lt; and &gt; to replace the less-than and greater-than signs. And for formatting reasons, one should use <br /> for every line break, and encase it within <code> tags. Finally, for indents, use several &nbsp; entities.

#include <iostream.h>

int main()
    cout << "Hello World!" << endl;
    return 0;

Chemistry Equation

A crucial component of any chemical equation is the subscripted numbers, designating the number of atoms in a molecule. To do this, one must use the <sub> tag.

2H2 + O2 => 2H2O + heat

List Example (order important)

To make a numbered list, the entire thing would be encased within <ol> tags, and each item would be encased in <li> tags.

Top five Countries by Human Development Index

  1. Norway
  2. Australia
  3. United States
  4. Netherlands
  5. Germany

List Example (order NOT important)

To make a unnumbered, bulleted list, use <ul> tags instead of <ol> tags. Individual items are still encased in <li> tags.

The greatest ponies!

  • Rarity
  • Rainbow Dash
  • Pinkie Pie
  • Fluttershy
  • Applejack
  • Her Royal Highness, Princess Twilight Sparkle of Ponyville
  • David Tennant