October 22, 2024
Chicago 12, Melborne City, USA
HTML

why does the character encoding of html source code needs to match the one declared in the meta charset tag


the title very much describes the question, the html standard says explictly that the only value acceptable for meta charset tag is utf-8, and even the nu html checker throws an error if any else value is used. But it also throws another error at the same time saying " Internal encoding declaration iso-8859-1 disagrees with the actual encoding of the document (utf-8). ". I used the value ‘iso-8859-1’ in the meta charset this time.

If the only value we can use is utf-8 i just can’t understand the need to state this as a rule to follow……

the html standard itself doesn’t says much about this, and the encoding standard of whatwg is too technical for me to read and find out myself so i need help



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video