Search code examples
htmlcharacter-encodinghead

Does it make sens to put a (meta charset="") element in a (title) element?


I'm going through the HTML beginner guide in the webplatform.org website and at (the HTML <head>) page in the (Setting your document's character encoding) section i'm not sure I understand that sentence:

It is, however, important to understand that just putting (meta charset="utf-8") in your title element doesn't magically convert your page to a UTF-8 encoding.

Do they mean, in your head element?

link to the page section


Solution

  • Yes, they mean the head element. That’s the only context where a meta tag for character encoding may validly appear. And a title element can contain only text, no tags.