Why is this HTML5 document invalid?

Well, it depends on what you are using.

  • if you are using the File Upload option, it depends on which encoding the HTML file was saved with.
  • if you are using the Direct Input option, it depends on the navigator.

If you don’t want the validator to guess, and use UTF-8, you can add the following line

<meta charset="UTF-8">

inside the the head element.