HTML tutorial - Special characters


Skip navigation.

Site search

Site navigation

HTML tutorial


Other tutorials

Special characters

Since HTML itself uses certain characters for its markup, those characters cannot be used on a page, or the browser will think they are part of the markup, and will not display them the way you want. But HTML has to make it possible to display these characters. In order to do this, it uses entities. Entities are written in the following format:


In fact, it is possible to write all characters in entity format, including those not supported by the encoding used by your server. These are the most important entity characters, and you should use them whenever you want to display the relevant characters, either inside the normal page content, or inside the atttributes of HTML elements:

The <code title="The &gt; means &quot;greater than&quot;">&gt;</code> character

The most important characters are these:

A & character
A < character
A > character
A " character
This is a space when you want more than one space between things

There are more. See the Web Design Group pages for more details or view my entity summary.

My entity summary page includes extended characters, and browser compatibility information (for 5th generation browsers).

HTML allows you do do several things to exceed the limitations of basic text. As well as allowing you to write entity characters that you would not normally be able to write, HTML allows you to add comments into your pages to remind yourself what you were doing, and what that part of the page represents. The browser will ignore them, and will act like they are not even there. These are defined as below, and to keep things easy and reliable, never include '--' anywhere inside your comment.

<!-- Comments go in here -->

For a more detailed look at comments, see my HTML and SGML comments article.

Last modified: 4 January 2011

  1. Previous
  2. Next
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.