JS Escape Sequence | HTML Entity

There are certain symbols in HTML that always seem to break your program. These include math, currency, greek alphabet symbol, etc. Either they are not available in your keyboard or browser to interpret them differently to what you intended. So here is the list to HTML code for different symbol and JavaScript escape sequence for the same.

Special Symbol:

Char HTML Code JS Escape Sequence
 !  !  \u0021
 “  "  \u0022
 #  #  \u0023
 $  $  \u0024
 %  %  \u0025
 &  &  \u0026
 ‘  '  \u0027
 (  (  \u0028
 )  )  \u0029
 <  &#60;  \u003C
 >  &#62;  \u003E

Capital Letters: All the letters starting from A and ending at Z has special HTML code and JS Escape Sequence. In HTML, they start with &#65, and end at &#90, and in JavaScript they increase from A to I with \u0041 to \u0048 respectively and then from J to O representation changes to \u004A to \u004F. Then from P to Y, the value increases from \u0055 to \u0059. Finally for Z we have \u005A.

Char HTML Code JS Escape Sequence
 A  &#65;  \u0041
 B  &#66;  \u0042
 C  &#67;  \u0043
 D  &#68;  \u0044
 E  &#69;  \u0045
 F  &#70;  \u0046
 G  &#71;  \u0046
 H  &#72;  \u0047
 I  &#73;  \u0048
 J  &#74;  \u004A
 K  &#75;  \u004B
 L  &#76;  \u004C
 M  &#77;  \u004D
 N  &#78;  \u004E
 O  &#79;  \u004F
 P  &#80;  \u0050
 Q  &#81;  \u0051
 R  &#82;  \u0052
 S  &#83;  \u0053
 T  &#84;  \u0054
 U  &#85;  \u0055
 V  &#86;  \u0056
 W  &#87;  \u0057
 X  &#88;  \u0058
 Y  &#89;  \u0059
 Z  &#90;  \u005A

Numbers: All the numbers starting from 0 and ending at 9 has special HTML code and JavaScript Escape Sequence. In HTML they start with &#48, and end at &#57; and in JavaScript they start from \u0030 and end at \u0039.

Char HTML Code JS Escape Sequence
 0  &#48;  \u0030
 1  &#49;  \u0031
 2  &#50;  \u0032
 3  &#51;  \u0033
 4  &#52;  \u0034
 5  &#53;  \u0035
 6  &#54;  \u0036
 7  &#55;  \u0037
 8  &#56;  \u0038
 9  &#57;  \u0039

Small Letters: All the letters starting from “a” and ending at “z” has special HTML code and JavaScript Escape Sequence. In HTML, they start with &#97, and end at &#122, and in JavaScript they increase from “a” to “i” with \u0061 to \u0069 respectively and then from “j” to “o” representation changes to \u006A to \u006F. Then from “p” to “y”, the value increases from \u0070 to \u0079. Finally, for z, we have \u007A.

Char HTML Code JS Escape Sequence
 a  &#97;  \u0061
 b  &#98;  \u0062
 c  &#99;  \u0063
 d  &#100;  \u0064
 e  &#101;  \u0065
 f  &#102;  \u0066
 g  &#103;  \u0067
 h  &#104;  \u0068
 i  &#105;  \u0069
 j  &#106;  \u006A
 k  &#107;  \u006B
 l  &#108;  \u006C
 m  &#109;  \u006D
 n  &#110;  \u006E
 o  &#111;  \u006F
 p  &#112;  \u0070
 q  &#113;  \u0071
 r  &#114;  \u0072
 s  &#115;  \u0073
 t  &#116;  \u0074
 u  &#117;  \u0075
 v  &#118;  \u0076
 w  &#119;  \u0077
 x  &#120;  \u0078
 y  &#121;  \u0079
 z  &#122;  \u007A

Math Symbols

° degree &deg; &#176;
infinity &infin; &#8734;
per-mille &permil; &#8240;
multiplication dot &sdot; &#8901;
± plus-minus &plusmn; &#177;
hermitian &dagger; &#8224;
&mdash; &#8212;
¬ &not; &#172;
µ Micro (mu) &micro; &#181;
falsum &perp; &#8869;
parallel &par; &#8741;

full-stack-img

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.