HTML Essential Training

Formatting page content

In this series of exercises, we'll explore how to use HTML elements to format basic page content.

Displaying special characters

Certain characters are reserved for HTML, meaning that you aren't allowed to use them in regular content. Using a left angle bracket like this "⟨" in your code can cause rendering issues in certain situations. Other characters are special characters or symbols that might not be available through the keyboard, or are used by other languages. To represent those characters in normal text, you can use what are known as named character entities.

These are special codes that the browser or user agent will then replace with the requested character. The syntax for them is relatively straightforward. You start with an ampersand (&) followed by the named entity that is then followed by a semicolon. To display an ampersand, for example, you would type in &. This can be extremely helpful when displaying &copu; and ™symbols, or writing mathematical formulas.

You can find a very thorough list of named character entities on Wikipedia.