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.

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

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