What’s a valid HTML5 document?

The title element is indeed required, but as Jukka Korpela notes, it also must be non-empty. Furthermore, the content model of the title element is:

Text that is not inter-element whitespace.

Therefore, having just a space character in the title element is not considered valid HTML. You can check this in W3C validator.

So, an example of a minimal and valid HTML5 document is the following:

<!doctype html><title>a</title>

Leave a Comment