View video tutorial

HTML Charset

HTML

By using HTML charset attribute browser ensures loading correct character set and display anything in html page properly.

HTML Character Encoding


There are various types of character encoding.

ASCII Character Set: American Standard Code for Information Interchange. It supports 128 character set.

ANSI Character Set:American National Standard Institute. It supports 256 character set.

ISO-8859-1 Character Set: Same as ASCII but It supports 256 character set.

UTF-8 Character Set: UTF-8 character encoding covers almost all of the characters and symbols in the world.

cahrset attribute is used in <meta> tag like below.

<meta charset="UTF-8">

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.

Example

<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
  <meta charset="UTF-8">
</head>
<body>
  <p>Example charset Attribute.</p>
  <h1>Heading big.</h1>
  <h2>Heading smaller.</h2>
  <p>Paragraph.</p>
</body>
</html>
Try it Now »

Click on the "Try it Now" button to see how it works.