Posts Tagged ‘Understanding the Basics of HTML’

How to Use Special Characters

March 5th, 2010 Computer Eucation No comments

By now, you may have noticed a potential problem with HTML. All of the markup tags are indicated by left and right angle brackets (greater-than and less-than symbols). These characters are reserved by HTML for use with tags. What happens when you want to include one of these characters in your text?

That’s a good question, and the problem isn’t limited to just those two symbols. A number of characters can’t be typed directly into the body text HTML, including many foreign language symbols. Fortunately, HTML provides a solution through the use of character entities. By using special codes, HTML can display all of the characters in the ISO-Latin-1 (ISO 8859) character set. HTML 3.2 also includes support for many mathematical symbols.

Tip Sheet

  1. For a complete list of named and numbered character entities available, see the Appendix. One of the most commonly used special characters is the copyright symbol (©). Placing a copyright statement at the bottom of your Web document is a good idea and helps to remind your readers that your material may not be reproduced without your permission.
  2. Netscape also supports named character entities for the copyright and registered trademark symbols (© and ®). However, because these names are not standard HTML, not all browsers support them. Because the correct display of these symbols is important, it’s a much better idea to use the numbered character entities for these symbols. Locate your cursor at the position in the document where the character entity for the special character is to be placed.
  3. A character entity begins with an ampersand (&), followed by the code, and ends with a semicolon. To place a double quote in your document, for example, type ".
  4. Other common character entities for characters that are reserved for HTML tags are < for the less-than symbol; > for the greater-than symbol; and & for the ampersand. Note that these named character entities are case-sensitive.
  5. You can also use named character entities for many foreign language symbols. For example, to create the umlaut used in the German phrase, ĂĽber alles, you would type in über alles.
  6. In addition to named character entities, you can use numbered character entities. HTML uses a subset of the ISO 8859/1 8-bit character set, and several characters, including the copyright symbol, trademark symbol, and mathematical symbols, are available when referenced by their numbered character entity. To insert a numerical character entity into HTML, type an ampersand, followed by a pound sign, the number of the character and a semicolon. For example, to enter the registered trademark symbol into your document, you would type ®. You can find a partial list of numerical character entities in the Appendix.