Entities

The French phrase for How are you? is Ça va?. The German phrase for Who are you? is Wie heißt du? And Russian for I speak Russian is Я говорю на русском языке. Each phrase uses letters not found on the standard QWERTY keyboard.

And if you want to show HTML code, you can’t use the standard greater-than or less-than signs as you see them on your keyboard; your browser will read that as actual markup.

So how does one make these characters show up on a screen? The answer is a type of code called an entity.

How To Create An Entity

Every entity starts and ends with specific characters. The character that starts an entity is the ampersand, or &. Omit this, and your code will not become a single character. The character that ends the entity is the semicolon (;). Omit this, and your browser will be confused about where the entity code is supposed to end, and you might get a character or simply the code as plain text.

To demonstrate this, I’ll show three very common characters by using entities.

<
Entity code: &lt;
>
Entity code: &gt;
&
Entity code: &amp;

The above entities are recognized no matter what the markup language.

For a complete list of entities (this is VERY handy) refer to this website.