HTML and CSS Reference
In-Depth Information
Character Entities for Special Characters
Character entities take one of two forms: named entities and numbered entities.
Named entities begin with an ampersand ( & ) and end with a semicolon ( ; ). In between is
the name of the character (or, more likely, a shorthand version of that name, such as
agrave for an a with a grave accent, or reg for a registered trademark sign). Unlike other
HTML tags, the names are case-sensitive, so you should make sure to type them in
exactly. Named entities look something like the following:
The numbered entities also begin with an ampersand and end with a semicolon, but
rather than a name, they have a pound sign ( # ) and a number. The numbers correspond to
character positions in the ISO-Latin-1 (ISO 8859-1) character set. Every character you
can type or for which you can use a named entity also has a numbered entity. Numbered
entities look like the following:
You can use either numbers or named entities in your HTML file by including them in
the same place that the character they represent would go. So, to place the word résumé
in your HTML file, you would use either
Appendix B, “HTML Quick Reference,” includes a table that lists the named entities cur-
rently supported by HTML. See that table for specific characters.
Character Sets
All web pages are rendered using a character set. A character set represents all the
letters, numbers, and symbols that can be displayed on the screen. HTML originally
supported only the ISO-Latin-1 character set, which supports most accented charac-
ters, but not common characters such as bullets, em dashes, and curly quotes.
Usually when you see a page that includes nonsensical symbols where punctuation
should be, it's because the browser is using a different character set than the one
that was used to create the document.
Search WWH ::

Custom Search