1. Computing & Technology

Discuss in my forum

Playing with HTML Codes

There's More to Special Characters than Accents

By , About.com Guide

Many people only use special characters for the accent marks. á Ì ê and so on. But there is more that you can do with them, if you want to.

Write HTML On the Screen
If you want to write HTML on the screen, you must use the extended characters to display & &amp;, < &lt;, and > &gt; While some browsers will display < if you just write < - you're running a risk that they won't. So, it's better to have at least those three HTML codes memorized.

Math
It's also possible to write basic math problems on Web pages: + plus, and - minus are both standard characters, but to write multiplication and division, you have to either use the alternate symbols: * (multiply) and / (divide). But HTML codes are available to use the real symbols:

  • × - &times;
  • ÷ - &divide;

Plus you can define several common fractions:

  • ¼ - &frac14;
  • ½ - &frac12;
  • ¾ - &frac34;

Editing
With special characters, you can define sections and paragraphs. Plus, you can also define real elipses, rather than just three periods in a row. You can also use HTML codes for basic footnoting, both with daggers and with numerals:

  • ¶ - &para;
  • § - &sect;
  • … - &#133;
  • † - &dagger;
  • ‡ - &Dagger;
  • ¹ - &sup1;
  • ² - &sup2;
  • ³ - &sup3;

Money
Don't be stuck with just $ again. Use HTML codes to define other monetary symbols such as:

  • ¢ - &cent;
  • ¤ - &curren;
  • £ - &pound;
  • ¥ - &yen;
  • € - &euro;

Fun Stuff
You might not have known that HTML codes actually include codes for characters you might not expect. From suits of cards to arrows to bullets, use these special characters to dress up your pages. Keep in mind, however, that some of these characters won't display on all browsers and platforms.

  • &spades;
  • &clubs;
  • &diams;
  • &hearts;
  • &larr;
  • &rarr;
  • &uarr;
  • &darr;

©2012 About.com. All rights reserved.

A part of The New York Times Company.