Reserved characters in HTML must be replaced with character entities.
HTML Entities
Some characters are reserved in HTML.
If you use the less than [] signs in your text, the browser might mix them with tags.
Character entities are used to display reserved characters in HTML.
A character entity looks like this:
&entity_name;
OR
entity_number;
To display a less than sign [
Note: Entity names are case sensitive.
Combining Diacritical Marks
A diacritical mark is a "glyph" added to a letter.
Some diacritical marks, like grave [ ̀] and acute [ ́] are called accents.
Diacritical marks can appear both above and below a letter, inside a letter, and between two letters.
Diacritical marks can be used in combination with alphanumeric characters to produce a character that is not present in the character set [encoding] used in the page.
Here are some examples:
̀ | a | à | à | Try it » |
́ | a | á | á | Try it » |
̂ | a | â | â | Try it » |
̃ | a | ã | ã | Try it » |
̀ | O | Ò | Ò | Try it » |
́ | O | Ó | Ó | Try it » |
̂ | O | Ô | Ô | Try it » |
̃ | O | Õ | Õ | Try it » |
You will see more HTML symbols in the next chapter of this tutorial.
An HTML entity is a piece of text ["string"] that begins with an ampersand [ Note: Many characters have memorable entities. For example, the entity for the copyright symbol [ Some special characters are reserved for use in HTML, meaning that your browser will parse them as HTML code. For example, if you use the
less-than [&
] and ends with a semicolon [;
]. Entities are frequently used to display reserved characters [which would otherwise be interpreted as HTML code], and invisible characters [like non-breaking spaces]. You can also use them in place of other
characters that are difficult to type with a standard keyboard.©
] is ©
. For less memorable characters, such as —
or —
, you can use a reference chart or
decoder tool.Reserved characters