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.
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, such as this one Character Encoder.