HTML Document Character Set and Encoding

HTML authors need to look up HTML character encodings frequently as some characters can not (or hard to) be typed out directly from the keyboard. If you would like not do the math and search, you may find the HTML symbols you want to use and its HTML code in Reference: Special HTML Characters.

Calculating the HTML character encoding from ASCII code

The characters that appear in ASCII Table can be represented with its decimal ASCII code.

For example, we want to encode HTML character ‘[‘.

First, look up the ASCII Table and find:

091  133  0x5B  01011011    [  (left opening bracket)

The decimal value for ‘[‘ is 091. The the HTML character encoding for ‘[‘ is: [

The HTML Document Character Set

You can also simply look up the character from HTML character set tables, such as this one The HTML Document Character Set.

Encoding HTML characters by tools

Some nice tools are available on the Web to encode HTML characters for you. You may search for these tools on the Internet.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *