HTML Charset
HTML Charset is also defined HTML Character Sets or HTML Encoding.Used to display an HTML page properly and correctly because for displaying anything correctly, a web browser must know which character set (character encoding) to use.
HTML Character Encoding:
There are different types of Character Encoding.
ASCII Character Set:
ASCII – American Standard Code for Information Interchange. The first-ever character encoding standard is the ASCII (American Standard Code for Information Interchange)standard. ASCII provides 128 various alphanumeric characters that could be used on the internet: numbers (0-9), English letters (A-Z), and some special characters like! $ + – ( ) @ <> .
ANSI Character Set:
ANSI stands for American National Standard Institute. It is a character set standard which is an extended version of the standard ASCII character set. It supports 256 character set. ANSI also called Windows-1252.
ISO-8859-1 Character Set:
ISO-8859-1 is defined as ASCII for the values from 0 to 127.ISO-8859-1 does not support the values from 128 to 159.ISO-8859-1 provides UTF-8 for the values from 160 to 255.
UTF-8 Character Set:
UTF-8 is a variable width character encoding that covers almost all characters and symbols in the world. ANSI (Windows-1252) was the original Windows character set, which supported 256 various character codes.
ISO-8859-1 was the default character set for HTML 4 version. This character set also supported 256 various character codes.
UTF-8 syntax for HTML4:
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
UTF-8 syntax for HTML5:
<meta charset="UTF-8">