Adding Characters from Outside the Encoding

If most of the characters on your page belong to one encoding and you just want to add a few characters from another, you can set the main encoding for the document (see page 330) and then use character references for characters outside of the main encoding.

A character reference can represent any character in Unicode by giving the character’s unique code within that set. A character’s code can be represented as either a regular (base 10) number or as a hexadecimal number. Some characters also have associated entities, that is, unique identifying words, that you can use instead of the number.

You can find a character’s code, in hexadecimal form (which is the most common), at the Unicode site: http://www.unicode.org/charts/ ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.