html5 error : Element head is missing a required instance of child element title

You should add the body-tag and the head-tag. And it should contain a title, which is not empty and also a charset setting.

<!DOCTYPE html>
<html>
   <head>
    <title>Title</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
  </head>
  <body>
    <div style="background-color: rgb(238,238,238);padding: 0;margin: 0;font-family: Open Sans , Helvetica Neue , Helvetica , Arial , sans-serif;font-size: 13.0px;background-color: rgb(238,238,238);">
    </div>
  </body>
</html>

As told in the validator:

Content model for element head: If the document is an iframe srcdoc document or if title information is available from a higher-level protocol: Zero or more elements of metadata content, of which no more than one is a title element and no more than one is a base element. Otherwise: One or more elements of metadata content, of which exactly one is a title element and no more than one is a base element.

Leave a Comment