All

How to Declare Encoding For Your Website via HTML?

All

We’ve started with the basic “how to”s so far, from Google analytics to language and redirects. Today we’re explaining how to declare encoding for your website using again Google’s most loved way to communicate: HTML.

Why You Should Declare Encoding

First off, Encoding helps the web in recognizing what characters you are using on your website, be it a personal blog, a business blog or a corporate page. It is important to declare Encoding so that all characters are correctly displayed on all devices. It is even more important to have Encoding on your website if

, for example, you wish to launch a multi-lingual platform and sell items or promote products on more than one language. Or in case you wish to use more regional languages, rather than international ones.

How to Declare Encoding via HTML

Character encoding for a HTML document is declared with a tag inside the <head> tag.

HTML5

For HTML5, the character encoding looks like this:


<head>

</head>

HTML 4.01

For HTML4.01, we use a more detailed encoding:


<head>

</head>

Extra Tips for Encoding

Instead of UTF-8, webmasters can use any character set from IANA character sets. However, no browser understands all of them. It is highly recommended that for a better chance of browser encoding recognition, a more widely character encoding should be used.