Why do I have to use the charset tag ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why do I have to use the charset tag ?

Today I have learned something about character set tag but I dont understand the purpose and why I have to use it.

11th Feb 2017, 3:52 PM
Samuele Sacchetti
Samuele Sacchetti - avatar
2 Answers
+ 4
The charset tag is especially useful if you are using any UTF-8 character, such as accented characters like in “café” or non-English characters (such as in Arabic, Chinese, Japanese, Thai…). It then allows you to directly type these characters in your HTML code without any further thinking. Otherwise, you would have to use the HTML code for the accented character (such as “café”). It is interesting to always set it so if you someday have to include some UTF-8 characters, you won’t have to spend time wondering why characters aren’t correctly displayed or to write the HTML code for each one of these special characters.
11th Feb 2017, 4:03 PM
Lucien Cartier-Tilet
Lucien Cartier-Tilet - avatar
0
thank you
11th Feb 2017, 4:32 PM
Samuele Sacchetti
Samuele Sacchetti - avatar