Back to the start of this explanation

Simple HTML and CSS


Sometimes it is necessary to make a tag appear in a text as it is, without it being interpreted as a tag by the browser. That will primarily happen in a text created in HTML, which is intended to explain HTML, such as this one.

The so-called entities are a way to achieve this. These are codes that begin with an & (ampersand), and end in a ; (semicolon). In between are some letters, or a code number, which indicate a character.

Some examples:

Encoding Character
& &
" "
&lt; <
&gt; >
&reg; ®
&copy; ©
&shy; Suggestion for where
to hyphenate if
&uuml; ü
&euml; ë
&aacute; á
&agrave; à
&ecirc; ê
&Ecirc; Ê
&atilde; ã
&otilde; õ
&Atilde; Ã
&Otilde; Õ
&ccedil; ç
&Ccedil; Ç
&szlig; ß
&aelig; æ
&oelig; œ
&AElig; Æ
&OElig; Œ
&aring å
&Aring; Å
&oslash; ø
&Oslash; Ø

For many more options see also these lists for Latin 1 and Latin 2.

Accented letters may also be entered directly, encoded in ISO-8859 or Unicode for example, provided this encoding is correctly indicated in the head of the document, using an appropriate meta tag.

The entities for "less than" and "greater than" make it possible to show tags. If the HTML has:
the browser will display:
so the reader understands that in the HTML that is described, the tag for "paragraph" should appear.


Back to the start of this explanation