Error: Element title not allowed as child of element head in this context.

What It Looks Like

  • Error: Element title not allowed as child of element head in this context. (Suppressing further errors from this subtree.)

    From line 11, column 1; to line 11, column 7

    </script><title>sdf</t

    Contexts in which element title may be used:
    In a head element containing no other title elements.
    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.
    Otherwise: One or more elements of metadata content, of which exactly one is a title element.

What The Spec Says

Here is a nice and easy breakdown of TITLE

How To Fix

This error message is almost longer than the spec! Just make sure you have only one <title> tag and that it appears inside the <head>