HTML and CSS Reference
18.104.22.168. Special text characters
Not all text characters available to you for display by a browser can be
typed from the keyboard. And some characters have special meanings,
such as the brackets around tags, which if not somehow differentiated
when used for plain textthe less-than sign ( < ) in a math equation, for
examplewill confuse the browser and trash your document. HTML and
XHTML give you a way to include any of the many different characters
that comprise the Unicode character set anywhere in your text through
a special encoding of its character entity .
Like the copyright symbol in our simple example, a character entity
starts with an ampersand ( & ), followed by its name, and terminated with
a semicolon ( ; ). Alternatively, you may also use the character's posi-
tion number in the Unicode table of characters, preceded by the pound
or sharp sign ( # ), in lieu of its name in the character-entity sequence.
When rendering the document, the browser displays the proper charac-
For obvious reasons, the most commonly used character entities are
the greater-than ( > ), less-than ( < ), and ampersand ( & ) char-
acters. Check Appendix F to find out what symbol the character entity
¦ represents. You'll be pleasantly surprised!
2.6.2. Text Structures
It's not obvious in our simple example, but the common carriage returns
we use to separate paragraphs in our source document have no mean-
ing in HTML or XHTML, except in special circumstances. You could have
typed the document onto a single line in your text editor, and it would
[*] We use a computer programming-like style of indentation so that our source HTML/XHTML docu-
ments are more readable. It's not obligatory, nor are there any formal style guidelines for source HTML/
XHTML document text formats. We do, however, highly recommend that you adopt a consistent style
so that you and others can easily follow your source documents.